Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
2023.0.0 - English


generates a vector of samples for t seconds at frequency freq Hz. (obsolete)


samples = soundsec(t)
samples = soundsec(t, freq)



a 1-by-1 matrix of positive real numbers, the time length to sample.


a 1-by-1 matrix of positive real number, the frequency of samples per second.

default value is 22050 Hz


Generates a vector coding time from 0 to t seconds at sampled rate freq.

Samples are always generated to fit in [0,t[ (excluding upper bound).

Value 0 for either t or freq return an empty matrix


// At first we create 0.5 seconds of sound parameters.
t = soundsec(0.5);

// Then we generate a pure A4 = 440Hz sine
s = sin(2*%pi*440*t);

See also

  • colon — Ranging operator. Addresses all elements along an array dimension or of a list.
  • linspace — generates linearly spaced numbers between 2 reached bounds
  • playsnd — command-line sound player facility
  • analyze — frequency plot of a sound signal


6.1.1 soundsec(t,…) declared obsolete. 0 : 1/freq : t*(1-%eps) replaces it.
Report an issue
<< sound Sound file handling wavread >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Nov 07 14:58:56 CET 2022