Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

About function definition

Asked by C Zeng on 31 May 2012

Hi, I want to define a function like:

function [V_max, a_max, runtime]=V(a,b,c)

If I write [x,y,z]=V(a,b,c) it will show three results.

If I write [x,y]=V(a,b,c), will it automatically show the first two results-V_max and a_max?

If [x]=V(a,b,c), will it show only V_max?

I just want to make sure whether it is defined as a convention. Thanks.

0 Comments

C Zeng

Tags

Products

No products are associated with this question.

1 Answer

Answer by Walter Roberson on 31 May 2012
Accepted answer

That happens automatically with a normal function definition.

1 Comment

C Zeng on 5 Jun 2012

Thanks.

Walter Roberson

Contact us