how to write this equation

1 次查看(过去 30 天)
Can someone help me write this equation. I am having problems with a bracket somewhere.Not getting the answer i needed.
Thanks
  6 个评论
sri satya ravi
sri satya ravi 2016-6-13
Hi Stephen Cobeldick,
I could figure out the equation. I got the result I was expecting.
Cf = sqrt((2*gama.*(r_cfv.^((gama-1)/gama)-1))./((gama-1).*(beta^4.-r_cfv.^(-2/gama))));
Thanks for the help.
John BG
John BG 2016-6-14
good, you got to the result you wanted.
The adding of .^ ./ is what I meant
Now you can throw in vectors, as long as same length, and obtain numeric results, better than working with symbolic variables.
Regards
John

请先登录,再进行评论。

采纳的回答

Stephen23
Stephen23 2016-6-12
编辑:Stephen23 2016-6-12
I used y and B to make it easier to read:
num = 2*y*(r^((y-1)/y)-1)
den = (y-1)*(B^4 - r^(-2/y))
out = sqrt(num/den)
  2 个评论
John BG
John BG 2016-6-12
I bet Satya wants it for vectors
Stephen23
Stephen23 2016-6-13
编辑:Stephen23 2016-6-13
Probably, but they didn't tell us which values are vectors. Probably this is a good place to start reading:

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by