Documentation for isnusig (SPASS).

Test of the non uniform signal structure


Description

The function isnusig tests whether a variable is a non uniform signal. Boolean output is 1 if it is indeed a non uniform signal, and is 0 else.

Usage

b = isnusig(nu)

Arguments

nu Variable. Hoped to be a Non Uniform signal.

Values

b Boolean.

See Also

Example

% Creation of a non uniform signal

  f = 1;           % signal frequency
  t = 10/f;        % signal duration
  t0 = 1.;         % initial time
  nbsamples = 10;  % number of samples
  times = t0+t*random('unif',0,1,1,nbsamples);
  times=sort(times); % time samples
  delay=time2delay(times,t0); % delay samples
  a = 0.45;        % signal amplitude

  ampl = a*sin(2*pi*f*times)+a*sin(4*2*pi*f*times)+0.9;   % amplitudes

  nu = nuinit(ampl,delay,t0);

% Test

  b = isnusig(nu)

% Making an error

  nu.delay = [nu.delay 0];

% New test

  b = isnusig(nu)