Message Boards Message Boards

[?] Manipulate of a 2-D plot?

Posted 7 years ago
Attachments:
POSTED BY: Terry Ackerman
3 Replies
Posted 7 years ago

Hans,

Thanks so much. You solution was very helpful!

POSTED BY: Terry Ackerman
Attachments:
POSTED BY: Hans Dolhaine

The problem seems to be to give the parameters to the plot instruction. Try this

A = {{1.2, .4}, {.8, .5}, {.9,        1.0}, {1.3, .5}, {.6, .9}}; u = {{\[Mu]1, \[Mu]2}};
DIF = {{.5}, {.7}, {1.0}, {-1.}, {2.0}};
\[CapitalOmega] = {{\[Sigma], 1}, {1, \[Sigma]}};
L = CholeskyDecomposition[\[CapitalOmega]];

Manipulate[
 W = Eigenvectors[
   Transpose[L].Transpose[A].A.L /. {\[Sigma] -> s, \[Mu]1 -> 
      m1, \[Mu]2 -> m2}];
 AM = List[A[[1]]];
 W1M = List[W[[1]]];
 W2M = List[W[[2]]] /. {\[Sigma] -> s, \[Mu]1 -> m1, \[Mu]2 -> m2};
 AHAT = AM.Transpose[W1M]/
   Sqrt[2.89 + AM.Transpose[W2M].W2M.Transpose[AM]];
 MDIF = (DIF[[1]] - AM.Transpose[u])/
    AM.Transpose[W1M] /. {\[Sigma] -> s, \[Mu]1 -> m1, \[Mu]2 -> m2};
 Plot[{(1/(1 + Exp[-1.7*AHAT*(\[Theta] - MDIF)]))}, {\[Theta], -3, 3},
   AxesLabel -> {\[Theta], p}, PlotRange -> {0, 1}]
 , {s, 1, 3}, {m1, -2, 2}, {m2, -2, 2}]
POSTED BY: Hans Dolhaine
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract