필터 지우기
필터 지우기

How to convert point plot to line plot?

조회 수: 2 (최근 30일)
Sherman Lim
Sherman Lim 2021년 12월 9일
답변: Chunru 2021년 12월 9일
Hi,
I would like to ask if it is possible to convert a plot which has coordinate points to a line plot that link such coordinates.
If so, how do I convert? Thanks in advance.
My code is below:
Fp = 1000; %Bandpass Freq
Fs = 2000; %BandStop Freq
SF = 10000; %Sampling Freq
Pr = 0.1; %Passband ripple
Sr = 0.001; %Stopband ripple
N = 13;
L = 14;
M = 7;
sll = -10;
u = cosh((1/N)*acosh(10^(-sll/20)));
mainbc = 0.05*pi; %center of desired mainband
bw = 0.1; %bandwith
ti = 1; %variance
for ang=0:0.001*pi:0.2*pi
xa =-(0.5*pi*sin(bw*(ang - mainbc)))^M;
xb = 2*ti^2;
e = exp((xa/xb));
H = cos((L - 1)*acos(u*e))
plot(ang,H,'b.'),grid on;hold on
end

채택된 답변

Chunru
Chunru 2021년 12월 9일
Fp = 1000; %Bandpass Freq
Fs = 2000; %BandStop Freq
SF = 10000; %Sampling Freq
Pr = 0.1; %Passband ripple
Sr = 0.001; %Stopband ripple
N = 13;
L = 14;
M = 7;
sll = -10;
u = cosh((1/N)*acosh(10^(-sll/20)));
mainbc = 0.05*pi; %center of desired mainband
bw = 0.1; %bandwith
ti = 1; %variance
% compute the result as a vector
ang=(0:0.001*pi:0.2*pi);
xa =-(0.5*pi*sin(bw*(ang - mainbc))).^M;
xb = 2*ti^2;
e = exp((xa/xb));
H = cos((L - 1)*acos(u*e));
plot(ang,H,'b-'),grid on;hold on

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기

태그

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by