Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

ParametricPlot (and its derivatives) and Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg115166] ParametricPlot (and its derivatives) and Manipulate
  • From: Jeff Patterson <user at compgroups.net/>
  • Date: Mon, 3 Jan 2011 03:56:29 -0500 (EST)

I am working on a symbolic network analysis package. After the netlist is entered, the user may selectively mask network elements to indicate that the visualization routines should treat these values as symbolic rather than use their numeric values. Thus the visualization routines do not know a priori the independent variables of the transfer functions. The visualization routines determines the variables and their indicated adjustment range and builds a Manipulate slider stack on the  fly.

This all works greatnfor Bode plots. 
 Manipulate[BodePlot[o,opt],Evaluate[rules]]
works as expected where o is a TransferFunctionModel and rules, built earlier in the routine, is the slider parameters passed to manipulate. opt is a pass trough for Plot options.

The same code does not work for any plotting function that uses ParameterPlot under the covers. So far I've tried NyquistPlot (the most natural choice), PolatrPlot and ParameterPlot. These plotting routines to not associate the variables in rules with the variables of the same name in the transfer function. None of the usually Evaluation, Hold/Release monkey business works. I get a set of default axis, with the correct slider which has no effect and no plot, just like when a function is passed to Plot which can not be evaluated numerically.

Undetered I tried building the transfer frunction on the fly using 
P[Apply[Sequence,Map[Pattern[#,Blank[]]&,vars]]]=TransferFunctionModel[(Z-1)/(Z+1),Global`s];
vars contains the independent variables which as passed as a pattern sequence to create P[var_,var2_..]. This gives Manipulate a function to pass its variables to.

Manipualte[P[Apply@Sequence[vars]],Evaluate[rules]] works as expected. I get a display of the transfer function whose coefficients change as I move the slider. As soon as I try the same trick with NyquistPlot I get the (unhelpful) message
Flatten::normal: Nonatomic expression expected at position 1 in Flatten[Automatic]. >>

Does anyone have any clue as to what's going on here? I'm out of tricks.

Thanks




  • Prev by Date: Re: Trial version of Mathematica 8 restrictions and a
  • Next by Date: Re: AVI with sound
  • Previous by thread: Re: Trial version of Mathematica 8 restrictions and a
  • Next by thread: Re: need help with CUDA setup on my MacBook Pro