Dear Chou-Ching,
instead of passing the function names as a string, you can also pass
them as function handles. If spm_eeg_filter returns the file name as an
output argument, you can pass it on. In this case, you would have to
tell the batch system how many outputs spm_eeg_filter has and what types
they have. If the filename is not returned, you are on your own, I'm afraid.
Volkmar
Am 27.04.2010 17:39, schrieb ŞLİz´¸:
> Dear Volkmar
> Thank you very much for the help.
> I think I figured out how to call functions like 'sum' and
> 'spm_eeg_filter' and put them all in a stream line of modules.
> My main mistake is too stupid to ignore that the input for "Function to
> be called' has to be string.
> But the GUI is a little bit annoying, because when you first typed in
> with apostrophe and re-open it, the apostrophe disappears and if you hit
> 'OK', then it gives you error message.
> One remaning question,
> for the input, I need to give a name for val.D in the case of
> 'spm_eeg_filter'.
> How to get the file name produced by the above module in a stream line,
> similar to dependency? so that I don't have to predict and write in the
> name by myself?
> Thanks again for the help.
> Sincerely,
> Chou-Ching
>
>
> 2010/4/27 Volkmar Glauche <[log in to unmask]
> <mailto:[log in to unmask]>>
>
> Dear Chou-Ching,
>
> you will have to look up MATLAB documentation/help texts etc to find
> out what is an appropriate input for the function you want to call.
> "Evaluated input" takes any valid MATLAB variable (e.g. an array, a
> struct, a cell...). If you enter a numeric matrix here and call the
> MATLAB function "sum", it would compute the sum of the matrix in the
> same way as MATLAB would do. In order to access the output, you
> would have to define the type of output variable as e.g. "evaluated"
> or "real". Then it will become available to subsequent batch modules
> in your job.
> This functionality is not intended to replace MATLAB programming.
> Its main purpose is to have quick access to basic MATLAB functions
> from within a batch job.
>
> Hope this helps,
>
> Volkmar
>
> Am 27.04.2010 06:18, schrieb ŞLİz´¸:
>
> Dear Volkmar
> Thank you for your help.
> I understand it needs some kind of correct inputs. But I just can't
> figure out what is proper.
> Take for example, if I am going to call a basic function 'sum'
> What is the input suppose to be? The offered possible options
> include
> 'evaluated input' and 'string'.
> (Actually, I don't understand what is meant by evaluated input.
> same as
> dependency?)
> I tried to give it an array or a variable or change it to
> string. None
> worked.
> Maybe this Call Matlab function is not to be used for calling these
> types of functions.
>
> If I try to call a more relevant function, spm_eeg_filter.m, it
> needs a
> structure as an input.
> Because there is no option of dependency, which means I need to call
> another function or m file
> first to construct a proper structure as input for it. Am I right?
> I think I will use script, instead of continuing trial and error
> with
> this function.
> Thanks, anyway.
> Sincerely,
> Chou-Ching
>
> 2010/4/26 Volkmar Glauche <[log in to unmask]
> <mailto:[log in to unmask]>
> <mailto:[log in to unmask]
> <mailto:[log in to unmask]>>>
>
>
> Dear Chou-Ching,
>
> you will have to supply the necessary inputs in their correct order
> by adding some of the input options. If you want to collect the
> outputs for further batch processing, you will also have to add the
> expected types of outputs in their correct output order.
>
> Hope this helps,
>
> Volkmar
>
> <https://www.jiscmail.ac.uk/cgi-bin/webadmin?A2=SPM;d36ace37.1004>
>
>
>
|