[Scilab-users] Generation of linear frequency

TViT tvitklg at rambler.ru
Sun Mar 10 14:44:33 CET 2013


Thanks! Help please with an example, I have created a file - 
D:\Program Files\scilab-5.4.0\modules\signal_processing\macros\chirp.sci
// ------------------------------
function [x] =chirp (T, W, p)

[ lhs, rhs] =argn (0);
if rhs < 3 then
    p = 1;
end    
J = sqrt (-1);
delta_t = 1 / (p*W);
N = round (p*T*W);
nn = [0:N-1] ';
x = exp (J * of % pi*W/T * (delta_t*nn - T/2). ^2);
endfunction
// ------------------------------

Has started buildmacros.bat

Has appeared chirp.bin

Has created a file LinGen.sci

// ------------------------------------
clc;
t = 0:0.001:2; // 2 secs 1kHz sample rate
y = chirp (t, 0,1,150); // Start DC, cross 150Hz at t=1 sec

plot (y);
// ------------------------------------

I start and in a command window writes many parameters, what not so, I do
not understand. I the beginner...))




--
View this message in context: http://mailinglists.scilab.org/Generation-of-linear-frequency-tp4026202p4026205.html
Sent from the Scilab users - Mailing Lists Archives mailing list archive at Nabble.com.



More information about the users mailing list