assigning of multiple arrays

1 次查看(过去 30 天)
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);

采纳的回答

KSSV
KSSV 2021-9-26
Read about deal.
[ss1, ss2] = size(0:1:38);
zitaa = ones(ss2,121);
[rhoo,thetaa,thetaa1,thetaa2] = deal(zeros(ss2,121)) ;

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Solver Outputs and Iterative Display 的更多信息

产品


版本

R2020b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by