Re: How to plot a variable
- To: mathgroup at smc.vnet.net
- Subject: [mg93129] Re: How to plot a variable
- From: dh <dh at metrohm.ch>
- Date: Mon, 27 Oct 2008 03:14:55 -0500 (EST)
- References: <gdrqge$ms6$1@smc.vnet.net>
Hi Knut, you must distinguish between functions and lists: ABB[1] is a function call with the parameter 1, but: ABB[[1]] is a list element. Further, Plot will take a function that is defined for a continuous variable, otherwise use ListPlot. hope this helps, Daniel Knut Sørsdal wrote: > When I iterate a variable in a do-loop it actually will not print out. Is it undefined? In Fortran this would never be a problem, but in mathematica it seems that it must be done different: > > Do[ GA = GA + .5*(G[J] + G[J + 1])*DELT ; Amp = Exp[2.*GA] ; > JJ = J + 1; ABB[1] = 1; ABB[JJ] = Amp, {J, 1, N1}] ; > pl1 = Plot[ABB, {n, 1, NAX}, PlotLabel -> "Impedans", Filling -> Axis, > PlotRange -> All] > > ABB gives no result.. > -- Daniel Huber Metrohm Ltd. Oberdorfstr. 68 CH-9100 Herisau Tel. +41 71 353 8585, Fax +41 71 353 8907 E-Mail:<mailto:dh at metrohm.com> Internet:<http://www.metrohm.com>