Help needed with trying to speed up a script
显示 更早的评论
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 个评论
Avi Sharma
2016-12-20
i am an undergratuating. can u help me. give me answer of some programs.
Avi Sharma
2016-12-20
pls send the solution of these programs
Star Strider
2016-12-20
We will never do your homework for you on MATLAB Answers!
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Digital Filter Design 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!