From: David Young on
But, us and TideMan, the question is reasonable, since you can call Matlab functions this way from the command line. There is a straightforward answer to the question: yes, everything is passed as a string, there is no automatic conversion, so you do need to call a conversion function for each argument that cannot be directly handled as a string.

From the documentation, specifically Programming Fundamentals > Functions and Scripts > Calling Functions > What Happens When You Call a Function:

---- quote ----

MATLAB Command Syntax

A command that makes a function call consists of the function name followed by one or more arguments separated by spaces. In most cases, all input arguments are considered to be strings. Because of this, enclosing string arguments with quotation marks is optional.

The format for calling a function using command syntax is
functionname string1 string2 string3

You can use command syntax in calling a function when both of the following are true:

* All input arguments must be characters or strings. Variable names, expressions that require evaluation, and non-character classes (e.g., doubles, structures, function handles) are not allowed.

* You do not need to capture output in a variable. Commands that display information on your monitor screen are acceptable.

---- end quote ----
From: us on
"Thusitha " <tsliyan(a)hotmail.com> wrote in message <htqk8d$rme$1(a)fred.mathworks.com>...
> "us " <us(a)neurol.unizh.ch> wrote in message
> > in the form
> > StylizedMMM(80,0.004,0.04,0.05,4,2)
> > instead of
> > StylizedMMM 80 0.004 0.04 0.05 4 2
> >
> > did you then go into your function and look at the difference in how the arguments look like/what they represent(?)...
> > did you do anything of that(?)...
> >
> > us
>
> ------------------------------------------------------
> I looked under ----> matlab -----> getting started ----> programming ----> scripts and functions ---> functions
>
> Can't see anything relevant.
>
> I normally ask question only if I can't find answers in Google or Matlab help.
>
> The problem is I am not sure how to form the question in this case.

well...
listen (what you were told) - think - do something - think, again...

now, once more...
1) edit a dummy function foo.m, which looks like this

function foo(val)
disp(val);
end

2) in the command window, do this
foo pi
foo(pi)

3) THINK...

us
From: us on
"David Young" <d.s.young.notthisbit(a)sussex.ac.uk> wrote in message <htqke1$92c$1(a)fred.mathworks.com>...
> But, us and TideMan, the question is reasonable, since you can call Matlab functions this way from the command line...

fully agree(!)...
that's why we tried to persuade the OP to look at the difference in the input args for the two ways to call his/her function...

us
From: Thusitha on
"us " <us(a)neurol.unizh.ch> wrote in message
>
> well...
> listen (what you were told) - think - do something - think, again...
>
> now, once more...
> 1) edit a dummy function foo.m, which looks like this
>
> function foo(val)
> disp(val);
> end
>
> 2) in the command window, do this
> foo pi
> foo(pi)
>
> 3) THINK...
>
> us

----------------------------------------
Sorry us.
You are talking to some one who is very experience in Java/C++/Pascal.

You have not giving me anything to think. What I need is a link to the language reference relating to how Matlab handles input parameters when called from the command line.
This is a simple question and there is no need for thinking.
From: David Young on
"Thusitha " <tsliyan(a)hotmail.com> wrote in message <htqlsu$b5q$1(a)fred.mathworks.com>...
> ... What I need is a link to the language reference relating to how Matlab handles input parameters when called from the command line.

See my reply above.