Solve a Equation Guide

2 次查看(过去 30 天)
Sergio
Sergio 2012-5-2
I need solve a equation with values get form the guide
Normally I used the the command solve, but this command needs the variables into the line, I cant change....
Wherever i tried to do this way...
syms a b kc
x=0.1345*a+3.7;
y=2.31*kc-1.2;
z=3*b;
w=3*a-2.134;
t=3*kc-1.2;
u=2.145;
[a,b,kc]=solve(x==y,w==z,t==u)
but obviusly doesnt work

采纳的回答

Walter Roberson
Walter Roberson 2012-5-2
Try
[a,b,kc] = solve(x-y,w-z,t-u,a,b,kc)
Your question about GUIDE is not clear. You can get() strings from edit boxes and str2double() the strings.
Are you trying to put the equations themselves in the edit box? That is possible: sym() the string and pass that into solve()
eq1 = sym(get(handles.BOX1, 'String'));

更多回答(0 个)

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by