How do i type this long equation?
16 次查看(过去 30 天)
显示 更早的评论
Hp41 = ((s/0.71) + 1)/[((s^2/5625) + (1.4*s/75) + 1))*s((s^2/9) + (0.74*s/9) + 1))]
1 个评论
John D'Errico
2020-5-13
You already managed to type it. And it is not that long. I suppose you could use dictation tools to recognize and then transcribe your speech, if that is your question.
Due to your use of brackets in a place where they are not needed, my guess is what you probably need most is to just learn MATLAB. Start at the MATLAB Onramp. The introductory tutorial is free.
回答(1 个)
the cyclist
2020-5-13
It is not possible to convert that expression to valid MATLAB syntax, because you have some mismatched parentheses.
Unless I made a mistake, the following is (mostly) equivalent to your expression:
a = s/71;
b = a+1;
c = s.^2/5625;
d = 1.4*s/75;
e = c + d + 1;
f = s.^2/9;
g = 0.74*s/9;
h = f + g + 1;
Hp41 = b ./ [e) * s(h))];
That's clearly not what you intended.
I'm not quite sure what you did intend, so I can't fix it. But not that square bracket in MATLAB are not used as "higher level parentheses" to group terms, in the way they are in written mathematics. So use parentheses for those, too.
So, something like the following is valid:
H41 = b ./ ( e * (s * h))
instead, but I don't know if it is what you want.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!