From: Alex on
Hi all,
I got a problem in using varargin.
What I want to to is to generate a function that have different inputs and that the values has to be declared.
e.g. myfun(2, 4, 'Value_1', 3, 'Value_3', n, ... )
what I need is to write the code that recognizes the fields. 'Value_1' etc..
cheers
alex
From: Andy on
"Alex " <demarco_alex(a)yahoo.it> wrote in message <i3h9rq$5ji$1(a)fred.mathworks.com>...
> Hi all,
> I got a problem in using varargin.
> What I want to to is to generate a function that have different inputs and that the values has to be declared.
> e.g. myfun(2, 4, 'Value_1', 3, 'Value_3', n, ... )
> what I need is to write the code that recognizes the fields. 'Value_1' etc..
> cheers
> alex

doc inputParser
From: Matt J on
Learn to use inputParser

http://www.mathworks.de/access/helpdesk/help/techdoc/matlab_prog/bresuxt-11.html
From: Oleg Komarov on
"Matt J " <mattjacREMOVE(a)THISieee.spam> wrote in message <i3hak5$no8$1(a)fred.mathworks.com>...
> Learn to use inputParser
>
> http://www.mathworks.de/access/helpdesk/help/techdoc/matlab_prog/bresuxt-11.html

Do you REALLY use input parser?
Isn't it slow?

Oleg
From: Matt J on
"Oleg Komarov" <oleg.komarovRemove.this(a)hotmail.it> wrote in message <i3hc6o$570$1(a)fred.mathworks.com>...
>
> Do you REALLY use input parser?
> Isn't it slow?
======

I don't use it, but I was considering starting. I'm not aware of complaints of it being slow. Isn't it written in optimized builtin code?
 |  Next  |  Last
Pages: 1 2
Prev: xlswrite?
Next: Read data from txt