bar of mean of last 3 entries for 2 data sets
12 ビュー (過去 30 日間)
古いコメントを表示
Hi im really really new at coding, beware
Im working on trying to make a bar graph of 2 data sets. I managed to plot the means for the whole set but I also need to bar plot for the mean of rows 28:30, but I cant make it spit out correctly. anything would be helpful, thank you.
0 件のコメント
回答 (1 件)
Star Strider
2024 年 4 月 9 日 0:08
編集済み: Star Strider
2024 年 4 月 9 日 0:21
It would help to have your data.
Perhaps something like this —
Data1 = randn(30) + randn(30,1);
Data2 = randn(30) + randn(30,1);
Data1Mean = mean(Data1,2);
Data2Mean = mean(Data2,2);
figure
bar([Data1Mean Data2Mean])
grid
figure
bar(28:30, [Data1Mean(28:30) Data2Mean(28:30)])
grid
EDIT — (9 Apr 2024 at 00:21)
Forgot about second data set. Now added.
.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Environment and Settings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!