フィルターのクリア

index exceeds matrix dimension

1 回表示 (過去 30 日間)
Haseeb Ahmed Janjua
Haseeb Ahmed Janjua 2017 年 9 月 27 日
whenever I create this function in editor
function r = Ymaxfinal(p,q)
r = ((-1000*p*q)/(27*(30*10^6)*0.163*(p+q)))*(p+(2*q))*((3*p(p+(2*q)))^0.5);
end
but when I call it in command window like Ymaxfinal(9,8)
it gives the error of Index exceeds matrix dimensions. plz help me
  1 件のコメント
Martin Olafsen
Martin Olafsen 2017 年 9 月 27 日
You're missing a multiplication ("*").
r = ((-1000*p*q)/(27*(30*10^6)*0.163*(p+q)))*(p+(2*q))*((3* --->p<---(p+(2*q)))^0.5);
Use this: r = ((-1000*p*q)/(27*(30*10^6)*0.163*(p+q)))*(p+(2*q))*((3*p*(p+(2*q)))^0.5);
Regards

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

採用された回答

KSSV
KSSV 2017 年 9 月 27 日
Change this line:
r = ((-1000*p*q)/(27*(30*10^6)*0.163*(p+q)))*(p+(2*q))*((3*p(p+(2*q)))^0.5);
to
r = ((-1000*p*q)/(27*(30*10^6)*0.163*(p+q)))*(p+(2*q))*((3*p*(p+(2*q)))^0.5);
  2 件のコメント
Haseeb Ahmed Janjua
Haseeb Ahmed Janjua 2017 年 9 月 27 日
thanks it works
god bless you
Haseeb Ahmed Janjua
Haseeb Ahmed Janjua 2017 年 9 月 27 日
please check your gmail email id. I need help in Some patterns
will be grateful on your feedback

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeMatrices and Arrays についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by