Mean of 72720 rows in one column such that I can take mean of 720 rows separately.

1 回表示 (過去 30 日間)
Hello!
I have data of 72720 rows in one coloumn. I want to take the mean of each 720 rows and then plot a graph.
Thank you

採用された回答

Star Strider
Star Strider 2019 年 11 月 16 日
Try this:
data = (1:72720)'; % Create Column Vector To Test Code
rdata = reshape(data, [], 720); % Reshape To Matrix
rdata_mean = mean(rdata); % Calculate Column Means
figure
plot(1:numel(rdata_mean), rdata_mean)
grid
Experiment to get the result you want.
  4 件のコメント
Anas Rao
Anas Rao 2019 年 11 月 17 日
Thankyou
Star Strider
Star Strider 2019 年 11 月 17 日
My pleasure.
It would be appropriate to accept my Answer.

サインインしてコメントする。

その他の回答 (2 件)

JESUS DAVID ARIZA ROYETH
JESUS DAVID ARIZA ROYETH 2019 年 11 月 16 日
data is your 72720 rows in one coloumn
mean720=mean(reshape(data,720,[]));
figure;
plot(mean720)
  1 件のコメント
Anas Rao
Anas Rao 2019 年 11 月 17 日
Thankyou for your answer and if I have to find the maximum value of new re-shape formed such that I have to find out the maximum value in each coloumn. I have tried max (mean720) but it is giving me error. Can you please guide me related to it.

サインインしてコメントする。


Anas Rao
Anas Rao 2019 年 11 月 18 日
The code is working but I don't know why in my MATLAB 'max or mean' function is not working. It is giving the following error. Can you please help me related to it. Thank you
Capture.PNG
  5 件のコメント
Anas Rao
Anas Rao 2019 年 11 月 18 日
Thankyou Sir. It is now working. Actually I have made a mistake in the begining with exporting the data on the MATLAB. The command is making it into cell form rather then number. Thank you for your help
Star Strider
Star Strider 2019 年 11 月 18 日
As always, my pleasure.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by