Filling a array/matrix without for-loop
1 view (last 30 days)
Show older comments
array = zeros(1, 20);
for i = 1:20
array(1,i) = %some formula dependent upon i, e.g. (i-1)*value1*value2/value3
end
Desired: A way to do it without the for-loop. I know it's probably out there yet but I didn't find it via the google or searching the forum. Sorry for possible duplicate.
0 Comments
Answers (1)
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!