assigning of multiple arrays
3 views (last 30 days)
Show older comments
I have 5 different arrays of same size. How can i optimize this? Something like rhoo = thetaa = thetaa1 = thetaa2 = zeros(ss2,121).
[ss1, ss2] = size(0:1:38);
zitaa = ones(ss2,121);
rhoo = zeros(ss2,121);
thetaa = zeros(ss2,121);
thetaa1 = zeros(ss2,121);
thetaa2 = zeros(ss2,121);
0 Comments
Accepted Answer
KSSV
on 26 Sep 2021
Read about deal.
[ss1, ss2] = size(0:1:38);
zitaa = ones(ss2,121);
[rhoo,thetaa,thetaa1,thetaa2] = deal(zeros(ss2,121)) ;
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!