Hello, I want to simulate a signal with 2 different frequencies for 2 different time span. For example..
ttotal = 0:200
for timespan t1 = 0:100
input signal fi= cos (w1*t1)
for timespan t2 = 100:200
input signal fi = cos (w2*t2)
for 0:100 the w1(frequency) is different and for 100:200 the w2 (frequency) is different.
in this w1 and w2 values are different .,,i have code for input signal with constant frequency for whole time span and i want to simulate it for changing frequency for different time span as above mentioned.
in the following code time span is 0:200 and input signal is
fi = cos (10*timespan)
here w = 10
**********************************
Tspan= 0:0.01:200; % time vector
fi = cos(10*Tspan)
ti=Tspan;
[T,Y]=ode45(@(t,y) myeqd(t,y,ti,fi),Tspan,[1;1;30]);
plot (T,Y)
************************** could any one tell me how to do it ? is parallel simulation is possible in MATLAB ? and if possible then how to do it ?
Best Answer