error: Array indices must be positive integers or logical values.

kw=0.6; L=1; do=0.06; di=0.05; B=330; kins=0.3; I=265; h=10:50;
m=(1/((kw(di)^2/(4*L))*((ln(do/di)/(2*kins))+(1/(h*do)))))^1/2;

回答 (1 件)

Steven Lord
Steven Lord 2021 年 2 月 24 日

0 投票

m=(1/((kw(di)^2 ...
There's no such thing as element 0.05 of an array in MATLAB. Perhaps you're missing a multiplication sign there and you want to multiply kw and the square of di?
/(4*L))*((ln(do/di)...
The function in MATLAB to compute the natural logarithm is log not ln.
/(2*kins))+(1/(h*do)))))^1/2;

カテゴリ

ヘルプ センター および File ExchangeMATLAB についてさらに検索

タグ

質問済み:

2021 年 2 月 24 日

回答済み:

2021 年 2 月 24 日

Community Treasure Hunt

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

Start Hunting!

Translated by