フィルターのクリア

How to select peak data and min data from noise in spectrum?

2 ビュー (過去 30 日間)
Sabella Huang
Sabella Huang 2022 年 7 月 4 日
コメント済み: Sabella Huang 2022 年 7 月 5 日
Hello Guys,
I want to take upside and downside noise signal from my spectrum (the dashed line) just like on this figure. Here, I attach the figure and the excel data. Please can anyone help me with this?.
Thank you, I waiting for your humbly answers

採用された回答

Emmanuel J Rodriguez
Emmanuel J Rodriguez 2022 年 7 月 4 日
編集済み: Emmanuel J Rodriguez 2022 年 7 月 4 日
Hello!
This should do it:
%% Import data
x = xlsread('Spectrum.xlsx','Sheet1','A1:A2503');
y = xlsread('Spectrum.xlsx','Sheet1','B1:B2503');
%% Plot data
plot(x,y)
hold on;
%% Find peaks and dips in the signal
% Peaks
[pks, pks_locs] = findpeaks(y,x); % Finds peaks and their locations
plot(pks_locs, pks, '--k') % Plots a black dashed-line connecting peaks
% Dips
[dip, dip_locs] = findpeaks(-y, x); % Find dips and their locations
plot(dip_locs, -dip, '--k') % Plots a black dashed-line connecting dips
hold off;
Cheers,
Manny
  1 件のコメント
Sabella Huang
Sabella Huang 2022 年 7 月 5 日
Ok, It's work. Thanks for your help

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

その他の回答 (0 件)

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by