tags:

views:

54

answers:

1

Hello,

I would like to know what is the use of having inputs in brackets like this :

[fx, fxx] = differentiate(...) why is fx and fxx in square brackets ?

Another example includes this [y,t,ysd] = step(m)

Please explain !

Thanks

+5  A: 

Matlab allows multiple return values. fx and fxx will each be assigned a return value of the function.

aioobe
So fx and fxx will hold the outputs of that function right ?? What if there was one result ?
ZaZu
if the method returns a scalar, you just type `fx = differentiate....`.
aioobe

related questions