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@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

_______________________________________________
users mailing list
users@lists.scilab.org
http://lists.scilab.org/mailman/listinfo/users

Reply via email to