- #1
Dell
- 590
- 0
as a part of a code i have written to solve an equivalent system in vector mechanics, i have reached the point where i need to solve 3 equations to find x, y, z, (the placement of the Vector Ftot)
i know the total momentum, which i call Mtot, and i know the total force, which is Ftot, what i am looking for is R which i call (x, y, z) while i know that RxFtot=Mtot, so what i have done is
...
now what i want to do somehow is get MATLAB to solve the 3 equations i get
but MATLAB doesn't recognise the contents of RF as an equation or Mtot as an answer, it wants me to type an actual equation which is not what i need since this is a code which needs to work for every system.
how can i use the solve function for the contents of a matrix?
i know the total momentum, which i call Mtot, and i know the total force, which is Ftot, what i am looking for is R which i call (x, y, z) while i know that RxFtot=Mtot, so what i have done is
...
Code:
syms x y z
R=[x y z];
RF=cross(R,Ftot);
now what i want to do somehow is get MATLAB to solve the 3 equations i get
Code:
solve(RF(1)=Mtot(1),RF(2)=Mtot(2),RF(3)=Mtot(3))
but MATLAB doesn't recognise the contents of RF as an equation or Mtot as an answer, it wants me to type an actual equation which is not what i need since this is a code which needs to work for every system.
how can i use the solve function for the contents of a matrix?