isusig tests whether a variable is a uniform signal. Boolean output is 1 if it is indeed a uniform signal, and is 0 else.
b = isusig(u)
||Variable. Hoped to be a Uniform signal.|
% Creation of a uniform signal f = 1; % signal frequency t = 10/f; % signal duration fs = 1000; % sampling frequency ts = 1/fs; % sampling time t0 = 1.; % initial time times = t0+(0:ts:t); % time samples a = 0.45; % signal amplitude ampl = a*sin(2*pi*f*times)+a*sin(4*2*pi*f*times)+0.9; % amplitudes u = uinit(ampl,ts,t0); % Test b = isusig(u) % Making an error u.t0 = [0 3]; % New test b = isusig(u)include "V2.0.inc"; include "author.inc"; include "footer.inc"; ?>