Re: Multiple Executions of .nb file
- To: mathgroup at smc.vnet.net
- Subject: [mg90479] Re: Multiple Executions of .nb file
- From: dh <dh at metrohm.ch>
- Date: Thu, 10 Jul 2008 06:37:45 -0400 (EDT)
- References: <g4vjhn$9b5$1@smc.vnet.net>
Hi Dave,
the way to do this is to define a function. Simply wrap a function
around the content of your notebook. I your case:
fun[]:=(multiplier == 1;Plot[{Sin[multiplier*x] // Print}])
then you may use the function inside a loop. Note that in version 6 you
must add a Print to the Plot statement.
hope this helps, Daniel
Dave wrote:
> Can I run a notebook file over a specific number of iterations and store the
> results?
>
> For example if I had a notebook file:
> test.nb
>
> multiplier == 1
> Plot[{Sin[multiplier*x]}]
>
>
> could I run it from another notebook
> run.nb
>
> For[i=1, i < 4, i = i + 1, initfile test.nb (multiplier == i)]
>
> and have the outputs stored in another file?
>
> if anyone has any suggestions or if I am not being clear:
> davidl4ie at yahoo.co.uk
>
>
>
>
>
--
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>