I want to create a zero baseline signal that extends for some time t. Throughout the duration of this signal, I would like to have 3000 randomized sinusoidal excitations. By randomized, I mean in terms of frequency, amplitude, width, and location of the event.
I'm not exactly sure how to create this. I created three randomized vectors using the rand function, one for abnormal amplitude, frequency, and width. However, I'm not sure how to specify the randomized location of each excitation. I have the following code so far:
clear all; clc;
addpath(genpath(pwd));
Fsam = 1000;
YNo = 10;
ENo = 3000;
This generates a randomized vector for Amplitude, Frequency, and Width of the abnormal excitations. The randomized values are rounded to the nearest integer
a = 0;
b = 10;
Rand.AbAmp = a + (b-a).*rand(1,ENo);
Rand.AbFreq = a + (b-a).*rand(1,ENo);
Rand.AbWid = a + (b-a).*rand(1,ENo);
Rand.AbAmp = round(Rand.AbAmp);
Rand.AbFreq = round(Rand.AbFreq);
Rand.AbWid = round(Rand.AbWid);
T.Start = 0;
T.End = 365*YNo;
T.Step = 1/Fsam;
Time.Ref = T.Start:T.Step:T.End;
Sig1 = Ab.Amp*sin(Ab.Freq*2*pi*Ab.Time + Ab.Phase);
Thanks for your help!