Solve a Equation Guide
조회 수: 1 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!