assigning of multiple arrays

조회 수: 1 (최근 30일)
CHANDRABHAN Singh
CHANDRABHAN Singh 2021년 9월 26일
답변: KSSV 2021년 9월 26일
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