[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to calculate mean for many files
From: |
Jaroslav Hajek |
Subject: |
Re: how to calculate mean for many files |
Date: |
Mon, 14 Dec 2009 07:27:06 +0100 |
On Mon, Dec 14, 2009 at 6:55 AM, febty febriani <address@hidden> wrote:
> For Jaroslav, I am sorry so much. I want to send my email to octave forum,
> not your email.
>
> For everyone, below my problem.
> I grabbed from my previous email.
>
> ###
> I am trying to describe my problem clearer. I am sorry there is some
> misunderstanding with my description.
> I have many files of data (total of files is about 365 files). Every file
> has 9 columns and 36 rows. How to find the mean of every row and column from
> files? For example :
>
> the first file
>
> 1 1 2 3 ... 6
> 2 2 1 4 ... 5
> .
> .
> .
> 3 4 2 1 .... 2
>
> the second file
>
> 2 1 5 3 ... 2
> 2 1 1 2 ... 1
> .
> .
> .
> 4 1 1 2 .... 1
>
>
> for above sample matrix, I will get mean for every row and column is
>
> 1.5 1 3.5 3 ... 4
> 2 1.5 1 3 ... 3
> .
> .
> .
> 3.5 2.5 1.5 1.5 ... 1.5
>
> ####
>
> any kind of help is appreciated.
> Thanks very much for your kind responses.
>
> Regards,
> febty
>
filenames = # cell array of strings
matrices = cellfun (@load, filenames, "UniformOutput", false);
means = plus (matrices{:}) / numel (matrices);
can you beat it... :)
regards
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
- Re: how to calculate mean for many files, febty febriani, 2009/12/14
- Re: how to calculate mean for many files,
Jaroslav Hajek <=
- Re: how to calculate mean for many files, febty febriani, 2009/12/14
- Re: how to calculate mean for many files, Jaroslav Hajek, 2009/12/14
- Re: how to calculate mean for many files, febty febriani, 2009/12/14
- Re: how to calculate mean for many files, Jaroslav Hajek, 2009/12/14
- Re: how to calculate mean for many files, Sergei Steshenko, 2009/12/14
- Re: how to calculate mean for many files, febty febriani, 2009/12/15
- Re: how to calculate mean for many files, Jaroslav Hajek, 2009/12/15
- Re: how to calculate mean for many files, febty febriani, 2009/12/15
- Re: how to calculate mean for many files, Jaroslav Hajek, 2009/12/15
- Re: how to calculate mean for many files, febty febriani, 2009/12/15