MathGroup Archive 2005

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

Search the Archive

Re: Problem using Evaluate[] inside a Plot command. 5.1

  • To: mathgroup at smc.vnet.net
  • Subject: [mg54254] Re: Problem using Evaluate[] inside a Plot command. 5.1
  • From: "Carl K. Woll" <carlw at u.washington.edu>
  • Date: Mon, 14 Feb 2005 21:50:49 -0500 (EST)
  • Organization: University of Washington
  • References: <cu78ub$me9$1@smc.vnet.net> <cumor4$3rc$1@smc.vnet.net> <cup5b7$drp$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Nasser,

Try putting Evaluate around the entire first argument of Plot, as in

Plot[ Evaluate[{t^2, OutputResponse[sys, UnitStep[t], t] }], {t, 0, 3}, 
PlotRange -> All]

Carl Woll

"Nasser Abbasi" <nma at 12000.org> wrote in message 
news:cup5b7$drp$1 at smc.vnet.net...
>D Herring wrote:
>
>> Hi Nasser,
>>
>> Maybe Evaluate[OutputResponse[sys,UnitStep[t], t]] is returning a value
>> which needs to be Evaluate[]d again before it can be plotted?
>>
>> I've never had your problem (don't even have the control toolbox), but
>> maybe
>>
>> Plot[{t2, Evaluate[Evaluate[OutputResponse[sys,UnitStep[t], t]]]},
>>        {t, 0, 3}, PlotRange -> All]
>>
>> might work?
>>
>> Your error message, "plot::plnr: .... is not a machine-size real
>> number at t=...." usually indicates the need to Evaluate[] one of the
>> Plot[] arguments.
>>
>> Good luck,
>> Daniel
>>
>
> Daniel;
>
> I tried your command above (You had a typo, 't2' should
> be 't^2' or just 't'), any way, it does not work either.
>
> I am sure this is a bug in Mathematica, either the kernel or the
> ControlSystems toolbox or the parser.
>
> It does not make sense for this command to work:
>
> Plot[ Evaluate[OutputResponse[sys, UnitStep[t], t]] ,
>       {t, 0, 3}, PlotRange -> All]
>
> But if I now simply combine another function in the plot command,
> so to plot 2 functions together, it will now fail:
>
> Plot[ {t^2, Evaluate[OutputResponse[sys, UnitStep[t], t]] },
>       {t, 0, 3}, PlotRange -> All]
> "plot::plnr: .... is not a machine-size real
>
>
> Why would the second example above fail but the first not fail?
>
> btw, the output from the OutputResponse[] is simply a list that
> contains a function of t, such as { Exp[t/2] Cos[t] }
>
> So, nothing too complicated here.
>
> bye,
> Nasser
>
>
>
> 



  • Prev by Date: Re: Using Select with arrays? (Relative newbie)
  • Next by Date: Re: Using Select with arrays? (Relative newbie)
  • Previous by thread: Re: Problem using Evaluate[] inside a Plot command. 5.1
  • Next by thread: Re: Problem using Evaluate[] inside a Plot command. 5.1