Info
This question is closed. Reopen it to edit or answer.
For loop of array
1 view (last 30 days)
Show older comments
Hi,
I have tried for loop to run a vector but having an error. Could anyone tell me how to loop the vector.
x = ones(10,1);
for k = 1:10
y(k) = x + k
end
Thanks, Kong
1 Comment
Jan
on 12 Jul 2017
Whenever you mention in the forum, that you "have an error", post a copy of the complete message. Otherwise the readers cannot guess, what the problem is.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!