[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Ploting

From: Robert A. Macy
Subject: Re: Ploting
Date: Thu, 29 Jun 2006 08:55:39 -0700

I'll take a guess here, when you say "10000 lines" you mean
a matrix with 10,000 rows of some number of columns? and
you'd like to plot the mean of the first half, but...

mean of 1 thru 5,000 rows? or, mean of 1 thru 10,000 of the
first half of the line?

sometimes it's handy to create dummy variables just in case
you want to play with them again...
assuming 'in' is your large matrix

>> [rowsin,columnsin]=size(in);
>> display1=mean(in((1:(round(rowsin/2),:));
>> display2=mean(in(round(rowsin/2)+1:end,:));
>> plot(display1);hold on;plot(display2);hold off;

that way you can see both means, or

>> display1b=mean(in(:,1:round(columnsin/2));
>> display2b=mean(in(:,round(columnsin/2+1:end));
>> plot(display1b);hold on;plot(display2b);hold off;
*untested code*

note this one appears "shorter" than a single line
and is really the single mean(in) cut in half.  First half
then second half.

Is either of those what you're after?

            - Robert -

On Thu, 29 Jun 2006 12:19:48 -0300
 "Gabriel F\. Ideriha" <address@hidden> wrote:
> Hi! I'm having a problem here... I have a matrix with
> 10000 lines and I want to plot the mean of the first half
> of it, how can I do it?
> I don't have any idea and I dont found anything about it
> in the help!!
> Thanks for the help!!!!

reply via email to

[Prev in Thread] Current Thread [Next in Thread]