Code covered by the BSD License  

Highlights from
Sinusoidal Random Process

image thumbnail

Sinusoidal Random Process

by

 

Modeling of Sinusoidal Random Process where either A,w, and phi can be random variable(s).

TestRandSine.m
% This script calls RandSine function which returns Random Process modelled
% by sinusoidal function and here on we can observe its sample function.

% Implemented by ASHISH MESHRAM
% meetashish85@gmail.com; http://www.facebook.com/ashishmeet
%-----------------------------Version History-----------------------------%
%  1.0                Monday, May 20, 2013            Implemented
%-----------------------------Version History-----------------------------%

clear all;clc;
t = linspace(-2*pi,2*pi);
N = input('Number of sample function to be displayed (less than 100)= ');
x = RandSine(t,'phi',1,1);
figure(1);
subplot(3,1,1);
plot(t,x(1:N,:));
title(['sine waveform X(t) = A*sin(w*t + phi) for random phase with ',num2str(N),' sample function']);
xlabel('Time');ylabel('A*sin(w*t + phi)');
grid on;

x = RandSine(t,'A',1,1);
subplot(3,1,2);
plot(t,x(1:N,:));
xlabel('Time');ylabel('A*sin(w*t + phi)');
title(['sine waveform X(t) = A*sin(w*t + phi) for random amplitude with ',num2str(N),' sample function']);
grid on;

x = RandSine(t,'w',1,1);
subplot(3,1,3);
plot(t,x(1:N,:));
xlabel('Time');ylabel('A*sin(w*t + phi)');
title(['sine waveform X(t) = A*sin(w*t + phi) for random frequency with ',num2str(N),' sample function']);
grid on;

x = RandSine(t,'all');
figure(2);
plot(t,x(1:100,1:100,21));
xlabel('Time');ylabel('A*sin(w*t + phi)');
title('sine waveform X(t) = A*sin(w*t + phi) for random amplitude and phase with single sample function');
grid on;

Contact us