フィルターのクリア

How to change size of graph

2 ビュー (過去 30 日間)
Phudit Kanittasut
Phudit Kanittasut 2021 年 3 月 26 日
コメント済み: Star Strider 2021 年 3 月 27 日
I want to resize for the highest dot from Y coordinate (5 x 10*4) to 100
pure_brain = readmatrix('Pure Brain Spectra.csv');
[pks,locs] = findpeaks(pure_brain(:,2));
x = 1:size(pure_brain,1);
[pks_min,pks_max] = bounds(pks) % Minimum & Maximum Values Of ‘pks’
figure
Lv = pure_brain(locs,2)>1E+4; % Set Threshold = 1E+4
% Lv = pure_brain(locs,2)>1; % Set Threshold = 1
plot(x(locs(Lv)), pure_brain(locs(Lv),2), '.r')
grid
title('Pure brain peak');
AB=unique(pks);
YB1=AB(end); %1Y
YB2=AB(end-1); %2Y
YB3=AB(end-2); %3Y
EB1=find(pks==YB1);
XB1=locs(EB1);
EB2=find(pks==YB2);
XB2=locs(EB2);
EB3=find(pks==YB3);
XB3=locs(EB3);
SYB = [ YB1 YB2 YB3 ];
SXB = [ XB1 XB2 XB3 ];

採用された回答

Star Strider
Star Strider 2021 年 3 月 26 日
If the objective is to re-scale all the values so that the highest is 100, then:
Y = (Y-min(Y,0)) * 100/max(Y);
would likely work.
  4 件のコメント
Phudit Kanittasut
Phudit Kanittasut 2021 年 3 月 27 日
Thank you so much
Star Strider
Star Strider 2021 年 3 月 27 日
As always, my pleasure!

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeDescriptive Statistics and Visualization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by