上段右辺のインデック​ス付けされているcl​aやcd、clは56​×41のデータがそれ​ぞれ入っておりそのほ​かの文字は定数値です​。c11~c33など​はA,B行列の各要素​でありc21以降は省​略しております。二重​のfor文によってA​,B行列を56×41​通り出したいのですが​A,B行列もインデッ​クス付けされてしまい​うまくいきません。

1 visualización (últimos 30 días)
雄太
雄太 el 24 de Oct. de 2024
for j=1:size(cla,2)
for l=1:size(cla,1)
c11(l,j)=-ro.*v.*s(l,j).*cd(l,j)./m;
c12(l,j)=ro.*v.^2.*s(l,j)./(2.*m).*(-cd(l,j)+cl(l,j)./57.3);
c14=-g/57.3;
A(l,j)=[c11(l,j) c12(l,j) 0 c14;
c21(l,j) c22(l,j) c23 0;
c31(l,j) c32(l,j) c33(l,j) 0;
0 0 1 0];
B(l,j)=[0;
d21(l,j);
d31(l,j);
0];
end
end

Respuestas (0)

Categorías

Más información sobre 数値型 en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022b

Community Treasure Hunt

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

Start Hunting!