[Scilab-users] Frequency response

Tan Chin Luh chinluh at tritytech.com
Tue Sep 18 04:25:05 CEST 2018


On 18/9/2018 5:15 AM, Rafael Guerra wrote:
> Chin Luh:  good to know but how does that solve Claus Futtrup specific problem?
> _______________________________________________
> users mailing list
> users at lists.scilab.org
> http://lists.scilab.org/mailman/listinfo/users
>
just notice that the answer similar as the one Tim provided, just a bit 
confused on Claus' comment on the "random" data:

On 17/9/2018 1:13 AM, Claus Futtrup wrote:
> What I like about the Matlab example is that random data is generated 
> to represent the impulse response, so this represents "any data" ... I 
> need that. If Scilab cannot do it, it's OK. 

Do you refer this "random" data to the example provided?

h = rand(1,64); % impulse response <-- This?
fs  =  1000;
Nfft  =  128;
[H,F]  =  freqz(h,1,Nfft,fs);
plot(F,H);  grid  on;

If so, the equivalent scilab code would be as below:

h  =  rand(1,64);
fs  =  1000;
b  =  poly(h($:-1:1),"z","coeff");
a  =  %z^(length(h)-1);
Gz  =  syslin('d',b,a);
Gz.dt  =  1/fs;
[F,H]=repfreq(Gz,0,500,0.01);
plot(F,H); Do note that I replace the last part of semilogx plot and 
replace with plot for more simple codes.

-- 
Tan Chin Luh
Trity Technologies Sdn Bhd
Tel : +603 80637737
HP : +6013 3691728

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20180918/121e09e8/attachment.htm>


More information about the users mailing list