No BSD License  

Highlights from
Stochastic Differential Equation (SDE) Solutions

from Stochastic Differential Equation (SDE) Solutions by Abhirup Lahiri
Function used to find solutions of first two moments of LSDE

LSDE(a,b,sigma,c,t)
% This function finds out the first two moments 
% of a linear Stochastic Differential Equation (LSDE)

% LSDE : dy(t) = ay(t)+ b*sigma*dW(t) where W(t) is Wiener Process
% Also dW(t)=n(t)dt where n(t) is Gaussian White noise

% Inputs : a, b, sigma( magnitude of sqrt of PSD) and 
%          c ( =y(0) initial conditions)
%          t (Time Vector) 

% Output :m(t)( First Moment - Mean)
%         M(t) (Second Moment)


% Note the solution statistics shown below have been derived using Ito's
% Calculus

% Author: abhiruplahiri@yahoo.com



function [m,M] = LSDE(a,b,sigma,c,t)

m=c*exp(a*t);

q=b^2*sigma^2/(2*a)
p=c^2+q;;

M=-q + p*exp(2*a*t);      % derived using Ito's Formula

%plot(t,m,t,M)
%grid







       



Contact us at files@mathworks.com