The function essentially simulates the colored noise which essentially is a correlated process and unlike the white noise does not have flat PSD. Although white noise is a realistic process color noise seems more practical and hence it requires correct modeling and simulation. The simulation here has been done by EM(Euler-Maruyama method)
The function has inputs as a, b where b dictates the intensity of white noise and N(the no. of samples which essentially defines the step size )
As a word of caution one of the inputs to the function T is a scalar (not a vector) and is the upper limit of time till which computation is required. The output is W along with the time vector and one can plot %plot(t,W) to see the result.
As an example: colornoise(1,1,1,1000)
Here computation would be till time 1 sec and the step size 1/(R*1000). R for the EM(Euler-Maruyama method) to 4.
Abhirup Lahiri (2020). Simulation of Color Noise (https://www.mathworks.com/matlabcentral/fileexchange/18269-simulation-of-color-noise), MATLAB Central File Exchange. Retrieved .
Change in Title