From: Wen Zhe on
Dearly beloved,

I have a slight problem and in need of a little assistance. Basically, i defined several variables in the main function of M file. Now, i want to be able to call the same variables in a sub function which is still part of the same M file. How would i be able to do so?

Many thanks,

Wen Zhe
From: us on
"Wen Zhe " <wenzhe2092(a)hotmail.com> wrote in message <ho7ge7$4ok$1(a)fred.mathworks.com>...
> Dearly beloved,
>
> I have a slight problem and in need of a little assistance. Basically, i defined several variables in the main function of M file. Now, i want to be able to call the same variables in a sub function which is still part of the same M file. How would i be able to do so?
>
> Many thanks,
>
> Wen Zhe

a hint:
- pass them as arguments into a subfunction...
- see also

help varargin;
help varargout;

us