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

how to combine multiple output in one lines?

Asked by Samious on 23 Sep 2013

E.g. I have a matlab function for example,

for i=(1:25) b=35-i

how do I get it to make an answer like

**************************

i | answer

1 | 34

2 | 33

3 | 32

4 | 31

********************

instead of

ans

34

ans

33

ans

32

ans

31

1 Comment

Jan Simon on 23 Sep 2013

We cannot suggest improvements of your code, when you do not show it.

Samious

Products

No products are associated with this question.

1 Answer

Answer by Robert Cumming on 23 Sep 2013
help fprintf 
help disp

0 Comments

Robert Cumming

Contact us