フィルターのクリア

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 Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by