Warning: Explicit solution could not be found.

조회 수: 1 (최근 30일)
Gun
Gun 2011년 3월 9일
편집: David 2013년 10월 21일
Sorry for disturbing you guys but i have wrote a code shown below:
upsilon=acos(x2a/6.85)
x3=47.5+5.35*cos(upsilon)
y3=5.35*sin(upsilon)
f4=(x4-x3)^2
f5=-sqrt(5.34^2-x4^2)
f6=(f5-y3)^2
x4main=f4+f6-46.7^2
solve(x4main)
y4=-sqrt(5.34^2-x4main^2)
The problem is when the warning appears saying that explicit solution could not be found.What is wrong with it?
Thanks.

답변 (2개)

Andrew Newell
Andrew Newell 2011년 3월 9일
Are you using the Symbolic Toolbox? I don't get any such warning. Maybe some of your variables already have an earlier definition? Try adding
clear
syms x1 x2 x3 x4 x2a
before the above commands.

David
David 2013년 10월 21일
편집: David 2013년 10월 21일
This is what you need to do, I think.
syms x2a x3 y3 x4 y4
upsilon=acos(x2a/6.85)
x3=47.5+5.35*cos(upsilon)
y3=5.35*sin(upsilon)
f4=sym((x4-x3)^2)
f5=sym(-sqrt(5.34^2-x4^2))
f6=sym((f5-y3)^2)
x4main=sym(f4+f6-46.7^2)
solve(x4main)
y4=-sqrt(5.34^2-x4main^2)
sym() constructs symbolic objects from the input you give it and solve() requires that the equations you give it are symbolic expressions.
Note: You may not need to put sym() around the equations for f4, f5, and f6, but you definitely do for x4main.
David

Community Treasure Hunt

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

Start Hunting!

Translated by