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

采纳的回答

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