Question: solve system of equations from mapleTA

For a question i'm trying to make for my students i need to solve a system of two linear equations, of which the coefficients are determined by predefined random variables. After that i need to assign the solution of the system to two variables. So far i have attempted two approaches, neither of which seem to work:

Solve using inverse matrix:

$oplossing=maple("with(LinearAlgebra):Matrixinverse(Matrix([[1,1],[tan(Pi*alphadeg/180),tan(Pi*betadeg/180)]]))*Vector([$F*sin($gamma),$F*cos($gamma)])");

$F1h=$oplossing[1];

$F2h=$oplossing[2];

 

Solve using 'solve' command:

$oplossing=maple("solve([$F1h+$F2h=$F*cos($gamma),$F1v+$F2v=$F*sin($gamma),$F1v/$F1h=tan(Pi*$alphadeg/180),$F2v/$F2h=tan(Pi*$betadeg/180)],[$F1h,$F2h,$F1v,$F2v])");

$F1h=$oplossing[1];

$F2h=$oplossing[2];

$F1v=$oplossing[3];

$F2v=$oplossing[4];

 

 

So far neither approach seems to work.

Many thanks for any usefull tips!

Please Wait...