Array indices must be positive integers or logical values

2 ビュー (過去 30 日間)
Allan Asturias
Allan Asturias 2020 年 3 月 22 日
コメント済み: Ameer Hamza 2020 年 3 月 22 日
Not sure why I am getting this error
T1=300;
T3=1500;
gamma=1.4;
r=12;
rf=1.6;
B=1:5;
Takeoffthrust=((T3/T1)*(1-r.^(-gamma-1/gamma))-(r.^(gamma-1/gamma))+1-B(rf.^(gamma-1/gamma)-1)).^1/2+B*(rf.^(gamma-1/gamma)-1)^1/2;
Takeoffthrustzero=((T3/T1)*(1-r.^(-gamma-1/gamma))-(r.^(gamma-1/gamma))+1).^1/2;
Takeoff=(Takeoffthrust/Takeoffthrustzero);
plot(B,Takeoff)

採用された回答

Ameer Hamza
Ameer Hamza 2020 年 3 月 22 日
Takeoffthrust=((T3/T1)*(1-r.^(-gamma-1/gamma))-(r.^(gamma-1/gamma))+1-B*(rf.^(gamma-1/gamma)-1)).^1/2+B*(rf.^(gamma-1/gamma)-1)^1/2;
% ^ you missed this multiplication operator
  2 件のコメント
Allan Asturias
Allan Asturias 2020 年 3 月 22 日
oh wow, thank you!!
Ameer Hamza
Ameer Hamza 2020 年 3 月 22 日
Glad to be of help.

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by