solving equation written in the functions
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Vijay Shankar Dwivedi
am 28 Okt. 2020
Bearbeitet: Aman Vyas
am 3 Nov. 2020
I want to solve three equations with three unknowns.
Force_x(x,y,z) == 0, Force_y(x,y,z) == 0, Force_z(x,y,z) == 0
vpasolve is not working here because Force_x works only when x y z are numbers, while vpasolve is passing symbols.
Help me with any other method or any modification.
my code:
[XX, YY] = vpasolve([Force_x(x,y,z)==0, Force_y(x,y,z)==0, Force_z(x,y,z)==0], [x, y, z], [0, 0, 0]);
error: Invalid arguments specified in evaluating the interpolant.
this error is due to symbols passed by Force_x.
2 Kommentare
KSSV
am 28 Okt. 2020
There should be some relation involving x,y,z right? Simply F_x = 0 ...will not work.
Akzeptierte Antwort
Aman Vyas
am 3 Nov. 2020
Bearbeitet: Aman Vyas
am 3 Nov. 2020
Hi,
You can try following code:
syms x y z Force_x Force_y Force_z
[X Y Z] = vpasolve([Force_x==0,Force_y==0,Force_z ==0],[x y z],[0 0 0])
This would start produce generic output as shown :
X =
Empty sym: 0-by-1
Y =
Empty sym: 0-by-1
Z =
Empty sym: 0-by-1
See this if it matches the requirement in output. Once you start calling function Force_x and other two then it should start outputting correct value.
Hope it helps !
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Conversion Between Symbolic and Numeric finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!