How do i type this long equation?

16 次查看(过去 30 天)
Vignesh Kumar
Vignesh Kumar 2020-5-13
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
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
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.

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by