Plot of maximum value of chosen column in matrix
2 ビュー (過去 30 日間)
古いコメントを表示
clear close all clc
t = linspace(0,10,15); t = t'; rng default M = rand(15,5);
plot(t, M(:,1)); max_M = max(M); %maximum of each column max = max(max(M)); %total max
I would like to plot maximum value of first column of matrix M(:,1); and indicate this information on a plot.
Something like this:
0 件のコメント
回答 (2 件)
madhan ravi
2018 年 10 月 23 日
編集済み: madhan ravi
2018 年 10 月 23 日
t = linspace(0,10,15);
t = t';
rng default
M = rand(15,5);
plot(t, M(:,1));
hold on
m = M(:,1)
[P,K]=findpeaks(m)
plot(t(K(1)),P(1),'x')
hold off
4 件のコメント
参考
カテゴリ
Help Center および File Exchange で Creating, Deleting, and Querying Graphics Objects についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
