1
$\begingroup$

I have to solve the following task: Write a Manipulate command containing the values ​​a, b, c and d of the matrix $\begin{pmatrix} a & b \\ c & d \end{pmatrix}$ each varied in the range [0,1]. Start with a and d at value 1 and b unch c at value 0. In the manipulate environment, plot the values ​​of all unit vectors after applying the matrix in a parametric plot. I wrote the following:

MatrixForm [M = {a, b}, {c, d}]
Manipulate [
ParametricPlot [
   M. {Cos [\ Phi], Sin [\ Phi]}, {\ Phi, 0, 2 Pi}, 
   PlotRange -> {{-1.4, 1.4}, {-1.4, 1.4}}], {{a, 1, "a"}, 0,
   1}, {{b, 0, "b"}, 0, 1}, {{c, 0, "c"}, 0, 1}, {{d, 1, "d"}, 0, 1} ] 

But it does not work. Can you help me? Thank you

$\endgroup$
0
$\begingroup$

Maniputate wants to see its variables explicitly in the expressions. This should work:

M = {a, b, c, d} \[Function] {{a, b}, {c, d}};
Manipulate[
 ParametricPlot[
  M[a, b, c, d].{Cos[ϕ], Sin[ϕ]}, {ϕ, 0, 2 Pi}, 
  PlotRange -> {{-1.4, 1.4}, {-1.4, 1.4}}], {{a, 1, "a"}, 0, 
  1}, {{b, 0, "b"}, 0, 1}, {{c, 0, "c"}, 0, 1}, {{d, 1, "d"}, 0, 1}]
$\endgroup$
  • $\begingroup$ It works like the Code I have wrote. I cannot see any graph. $\endgroup$ – Kathe Apr 11 at 13:24
  • $\begingroup$ How exactly does it look like? Maybe you have deactivated dynamic updating? Have a look in the "Evaluation" menue. $\endgroup$ – Henrik Schumacher Apr 11 at 13:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.