bw = 36;
angle = 60;
syms ds
tw = bw + 2*(ds / tand(angle));
nm = 0.025;
Area = 0.5*(bw + tw)*ds;
P = bw + 2*(ds/sind(angle));
S = 0.00001;
A = (((Area)^(5/3))/((P)^(2/3))) == ((200*nm)/(S^0.5))
height =(vpasolve(A,ds));
OUTPUT: - 49.95106 - 10.88106i
The output is wrong, the correct answer for the above code should be 10.19
Can anyone please tell me why I am not getting the actual answer as 10.19

 採用された回答

Walter Roberson
Walter Roberson 2021 年 7 月 2 日

0 投票

height = vpasolve(A, ds, 1);

5 件のコメント

Raj Arora
Raj Arora 2021 年 7 月 2 日
Thanks walter can you please tell me what initial paramter here means
Walter Roberson
Walter Roberson 2021 年 7 月 2 日
The 1 here is the initial guess. vpasolve uses a Newton Raphson type method, so the results can depend on the initial location when there are multiple roots. The output you saw was not an error: it was just a different root. Your formula includes values to the (5/3) power, so if the initial guess takes the term negative, then negative to a fractional power is complex valued.
G A
G A 2021 年 7 月 2 日
編集済み: G A 2021 年 7 月 2 日
Walter, why my (not correct) answer (I have deleted it already)
height = vpasolve(A,nm);
does give the right result?
Walter Roberson
Walter Roberson 2021 年 7 月 2 日
Most any positive initial value should work
G A
G A 2021 年 7 月 2 日
編集済み: G A 2021 年 7 月 2 日
Thanks, Walter - I understood postfactum that nm was interpreted as the initial value because it cannot be an argument.

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

その他の回答 (0 件)

カテゴリ

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

タグ

質問済み:

2021 年 7 月 2 日

編集済み:

G A
2021 年 7 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by