How to convert point plot to line plot?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multirate Signal Processing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!