Error problems when trying to solve cubic equation

2 次查看(过去 30 天)
I have Fr=0:0.2:8.2, then F=Fr*0.36840315 and Qw=Fr*0.556250681179147.
I am trying to find the roots of a cubic equation solving for Q.
I try and use this formula to solve it but keep getting this error. roots(((Q./Qw).^3-(Q./Qw)-(1./F.^3))=0) | Error: The expression to the left of the equals sign is not a valid target for an assignment.
Any help as to how to overcome this error or an alternative solution to this problem would be greatly appreciated.

采纳的回答

NN
NN 2012-11-8
编辑:NN 2012-11-8
Have a look at the manual. roots needs an array of coefficients to solve the problem. You gave it an equation. I am also not quite sure what you want to do.
  2 个评论
Matthew
Matthew 2012-11-8
Thanks, although it then says Undefined function or variable 'Q'. I am trying to solve for Q however any suggestions on how to solve this?
NN
NN 2012-11-8
I do not yet understand what you want to do. Do you look for a cubic polynomial or do you try to solve the equation Q:(q,i)->(q/(Qw(i)))^3- (q/(Qw(i)))-1/F(i); And search the q in dependence of i for which Q(q,i)=0?

请先登录,再进行评论。

更多回答(0 个)

类别

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

Community Treasure Hunt

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

Start Hunting!

Translated by