Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: How do I show variable value in the same line of variable name in the
command window

Replies: 1   Last Post: Nov 30, 2011 9:36 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
mailcwc@gmail.com

Posts: 52
Registered: 7/14/05
How do I show variable value in the same line of variable name in the
command window

Posted: Nov 29, 2011 10:25 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

I want to list the values of some selected variables in a given order.
The most easy way is type each variable one by one.
For examples,
a=1;
b=2;
c=3;
a
b
c

In the command widows, it will show
a =
1
b =
2
c =
3

Is it possible to make it look like
a = 1
b = 2
c = 3

I don't want the values showed in a new line.
the later is more readable for me.
Moreover, this way can show more variables at the same time on the
screen.

The second ideas is to use cell array, but these mean more coding.
A{1,1} = 'a';
A{1,2} = a;
A{2,1} = 'b';
A{2,2} = b;
A{3,1} = 'c';
A{3,2} = c;

A =
'a' [1]
'b' [2]
'c' [3]






Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.