フィルターのクリア

How to show dot graph in specific range

2 ビュー (過去 30 日間)
Phudit Kanittasut
Phudit Kanittasut 2021 年 3 月 21 日
コメント済み: Star Strider 2021 年 3 月 21 日
How can I show the dot that occour above 1

採用された回答

Star Strider
Star Strider 2021 年 3 月 21 日
I am not certain what you want.
Adapt this to your data:
x = linspace(0, 7200, 250); % Create ‘x’
y = rand(size(x))*4.5E+4; % Create ‘y’
figure
plot(x, y, 'r.')
hold on
Lv = y>1E+4; % Set Threshold At 1E+4
plot(x(Lv), y(Lv), '.b')
hold off
legend('All Data', 'Data Above Threshold')
.
  9 件のコメント
Phudit Kanittasut
Phudit Kanittasut 2021 年 3 月 21 日
This is my code and my data
Star Strider
Star Strider 2021 年 3 月 21 日
All the ‘pks’ values are greater than 1, and range from 102 to 45448:
pure_liver = readmatrix('Pure Liver Spectra.csv');
[pks,locs] = findpeaks(pure_liver(:,2));
x = 1:size(pure_liver,1);
[pks_min,pks_max] = bounds(pks) % Minimum & Maximum Values Of ‘pks’
figure
Lv = pure_liver(locs,2)>1E+4; % Set Threshold = 1E+4
% Lv = pure_liver(locs,2)>1; % Set Threshold = 1
plot(x(locs(Lv)), pure_liver(locs(Lv),2), '.r')
grid
title('Pure Liver peak');
Note that what appears to be ‘1’ on the plot is actually . Choose the ‘Lv’ assignment that does what you want.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Import and Export についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by