Default Arguments in Matlab

Posted by Scott on Stack Overflow See other posts from Stack Overflow or by Scott
Published on 2009-04-28T00:46:13Z Indexed on 2011/02/20 15:25 UTC
Read the original article Hit count: 211

Filed under:
|
|

Hello.

Is it possible to have default arguments in Matlab? For instance, here:

function wave(a,b,n,k,T,f,flag,fTrue=inline('0'))

I would like to have the true solution be an optional argument to the wave function. If it is possible, can anyone demonstrate the proper way to do this? Currently, I am trying what I posted above and I get:

??? Error: File: wave.m Line: 1 Column: 37
The expression to the left of the equals sign is not a valid target for an assignment.

Thanks!

© Stack Overflow or respective owner

Related posts about matlab

Related posts about arguments