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!