Error: Unable to perform assignment because the left and right sides have a different number of elements.

2 ビュー (過去 30 日間)
Please help me:)
v2=11.5;
k1=-0.5748;
k2=0.4468;
k3=0.0128;
for i = 1:1:6
z = 1:1:6;
z1 = 0:1:6-1;
e1(i) = ((-v2/2)+(0.125*(z1)))*k1
e2(i) = ((-v2/2)+(0.125*(z1)))*k2;
e6(i) = ((-v2/2)+(0.125*(z1)))*k3;
e1(i) = ((-v2/2)-(0.125*(z)))*k1;
e2(i) = ((-v2/2)-(0.125*(z)))*k2;
e6(i) = ((-v2/2)-(0.125*(z)))*k3;
end
  5 件のコメント
Walter Roberson
Walter Roberson 2020 年 3 月 14 日
Ahmed you posted as a comment, not as an Answer ;)

サインインしてコメントする。

採用された回答

Ahmed Anas
Ahmed Anas 2020 年 3 月 14 日
v2=11.5;
k1=-0.5748;
k2=0.4468;
k3=0.0128;
z = 1:1:6;
z1 = 0:1:5;
for i = 1:1:6
e1(i) = ((-v2/2)+(0.125*(z1(i))))*k1;
e2(i) = ((-v2/2)+(0.125*(z1(i))))*k2;
e6(i) = ((-v2/2)+(0.125*(z1(i))))*k3;
e1(i) = ((-v2/2)-(0.125*(z(i))))*k1;
e2(i) = ((-v2/2)-(0.125*(z(i))))*k2;
e6(i) = ((-v2/2)-(0.125*(z(i))))*k3;
end

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMATLAB についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by