필터 지우기
필터 지우기

How to plot line spectrum in matlab ?

조회 수: 33 (최근 30일)
Nguyen Trong Nhan
Nguyen Trong Nhan 2018년 11월 9일
답변: Star Strider 2018년 11월 9일
I would like to plot a spectrum (output of FFT) with a form like the provided image. How do I do it? Because the common plot in matlab is connecting of all point.

답변 (2개)

madhan ravi
madhan ravi 2018년 11월 9일

Star Strider
Star Strider 2018년 11월 9일
Use the stem (link) function for the plot.
Example
f = 0:0.1:3.5; % Create Frequency Vector
h = exp(-f) + 0.5*rand(size(f)); % Create Amplitude Vector
figure
stem(f, h, 'Marker','none')

카테고리

Help CenterFile Exchange에서 Fourier Analysis and Filtering에 대해 자세히 알아보기

태그

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by