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: graphs's title
Replies: 2   Last Post: Dec 11, 2012 8:42 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 5,705
Registered: 2/7/05
Re: graphs's title
Posted: Dec 11, 2012 6:05 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 12/11/2012 3:57 AM, Debora wrote:
> I have an array called hello and contains six names, and each name should be
>the title of my six graphs, how should I do?
>


use a loop?

-----------------------
names={'a','b','c','d','e','f'}
N = length(names);
x = 1:10;
y = sin(x);

for i = 1:N
subplot(2,N/2,i);
plot(x,y);
title(names{i});
end
---------------------

--Nasser


Date Subject Author
12/11/12
Read graphs's title
Debora
12/11/12
Read Re: graphs's title
Nasser Abbasi
12/11/12
Read Re: graphs's title
Debora

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.