Symbolic Solver Question
显示 更早的评论
Hey, quite new to MATLAB so sorry if this is a very rookie issue :/ Also tried searching for it but couldn't see it, sorry if it's already been asked.
I have the below in a matlab function file...
clc;
Pr=140000;
Cdz=0.025;
Rho=1.225;
S=16.2;
W=12753;
e=0.85;
AR=7.469136;
a=(0.5*Cdz*Rho*S)
b=((2*W^2)/(pi*e*AR*Rho*S))
syms v;
solve('((a)*v^3)+(((b)/v))-Pr')
However whilst it will give me the values of a and b, it won't use those values (or Pr) in the equation it's solving. Instead it will give me an extremly complex answer. So I'm having to run it twice, once to get a value for a and b (not hard to work out but that's what matlab is there for right?! :P) and then I have to go back and insert those values into the equation (along with Pr) and run it again to get my solution.
What am I missing to get the solver to use the calculated values of a, b and Pr? Really confused what I've overlooked :s
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Symbolic Math Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!