Have any command for copy variable without loop.
Show older comments
A=[1; 2; 3];
B=[4, 5, 6];
for k = 1:20
c(:,:,k) = A;
d(:,:,k) = B;
end
I want to calculate values of c(:,:,k) and d(:,:,k) without loop.
Accepted Answer
More Answers (0)
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!