Anyone know why I am recieving this error?
Show older comments
z=1;
m=1;
at = 1;
data = rand(7004829, 1);
for k = 2 : at : length(data)
if k ~= (k+1)
index1=k;
y(m,1) = data(index1:z);
z = k;
m = m+1;
end
end
1 Comment
Walter Roberson
on 28 Dec 2018
Please do not close questions that have an Answer.
Accepted Answer
More Answers (1)
madhan ravi
on 28 Dec 2018
Edited: madhan ravi
on 28 Dec 2018
0 votes
- id is not defined
- if condition is superfluos though , always k is not equal to k + 1
- y needs to be preallocated
- y can be preallocate as a cell to further avoid error ( unable to perform ....due to size)
2 Comments
Cem SARIKAYA
on 28 Dec 2018
Edited: Cem SARIKAYA
on 28 Dec 2018
madhan ravi
on 28 Dec 2018
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!