Warning: Explicit solution could not be found.

2 visualizzazioni (ultimi 30 giorni)
Gun il 9 Mar 2011
Modificato: David il 21 Ott 2013
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.
0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

Risposte (2)

Andrew Newell il 9 Mar 2011
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.
0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

David il 21 Ott 2013
Modificato: David il 21 Ott 2013
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
0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

Categorie

Scopri di più su Conversion in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by