How to convert point plot to line plot?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Sherman Lim
am 9 Dez. 2021
Beantwortet: Chunru
am 9 Dez. 2021
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 Kommentare
Akzeptierte Antwort
Chunru
am 9 Dez. 2021
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 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Multirate Signal Processing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!