Help needed with trying to speed up a script
Afficher commentaires plus anciens
Hi There,
I have a vector of length 2500 which represents a signal sampled at 250Hz.
I need to obtain the Z transformation of this vector. Unfortunately the code I have at the moment is very slow to run (see below).
Is anyone able to suggest some changes which may make the code quicker?
%%Band Pass Filtering
ECG = load('Testm.mat');
d = designfilt('bandpassiir','FilterOrder',10, ...
'PassbandFrequency1',0.5,'PassbandFrequency2',50, ...
'PassbandRipple',3, ...
'StopbandAttenuation1',40,'StopbandAttenuation2',40, ...
'SampleRate',250);
FD = filter(d,ECG.val(1,:));
fvtool(d,'Fs', 250)
%%Zero Padding
B = padarray(FD,4);
%%Unilateral Z transformation
syms z
l = length(FD)
for i=1:l
z_t(i) = FD(i)/(z^i)
end
sum(z_t)
pretty(ans)
kind regards
Dr. Nic
3 commentaires
Avi Sharma
le 20 Déc 2016
i am an undergratuating. can u help me. give me answer of some programs.
Avi Sharma
le 20 Déc 2016
pls send the solution of these programs
Star Strider
le 20 Déc 2016
We will never do your homework for you on MATLAB Answers!
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Digital Filter Design dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!