2d plot:calculate the average value along one axle
1 回表示 (過去 30 日間)
古いコメントを表示
Dears, I want to create a 2d plot that calculate the average value along one axle. There are is a pre-defined function in matlab? I add the scatter plot and the array
0 件のコメント
回答 (1 件)
Walter Roberson
2017 年 2 月 13 日
x = NEW_coo_y_cp(:,1);
y = NEW_coo_y_cp(:,2);
mx = mean(x);
my = mean(y);
scatter(x, y);
ax = gca;
xl = get(ax, 'XLim');
yl = get(ax, 'YLim');
line([mx, mx], yl, 'Color', 'g');
line(xl, [my my], 'Color', 'k');
参考
カテゴリ
Help Center および File Exchange で Histograms についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!