I would like to shorten the code, but keep the same type and size of the variable N{t}{w}(i).
3 views (last 30 days)
Show older comments
for t = 1:3
for w = 1:3
for i=1:10
N{t}{w}(i) = 0;
end
end
end
0 Comments
Answers (1)
Walter Roberson
on 29 May 2023
Edited: Walter Roberson
on 29 May 2023
N = repmat({repmat({zeros(1,10)}, 1, 3)}, 1, 3)
0 Comments
See Also
Categories
Find more on Loops and Conditional Statements 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!