[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: passing m-files as a function argument
From: |
Jaroslav Hajek |
Subject: |
Re: passing m-files as a function argument |
Date: |
Fri, 22 Jan 2010 21:35:56 +0100 |
On Fri, Jan 22, 2010 at 4:15 PM, parigigi <address@hidden> wrote:
>
> Hi everybody,
>
>
> I am currently using a commercial software that is giving me in output
> several m-files as a results of different simulations. I would like to do
> the same analysis on each m-files. So I want to write a function that
> accepts a filename as an argument. Lets suppose that I want to apply
> 'myanalysis' function on a single output m-file of this commercial software.
> I want something that allows me to do:
>
> myanalysis (output_m-file_name,parameter);
>
> At a certain point inside this function I want to load this m-file as
> following:
>
> output_m-file_name;
>
> ecc...
>
>
> I still don't understand how to pass a m-file name as an argument. I tried
> with quotas " ' ", without, with "@" but nothing worked... Where am I wrong?
>
What do the m-files contain? Functions or data? If it's a regular
m-function, you can use a function handle: @function_name.
For datafiles, see "load", "fopen", or "dlmread".
--
RNDr. Jaroslav Hajek, PhD
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz