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!