MATLAB: Need to write a code for this method….

plot

Hi Everyone,
I need to write a code for the following method.I want to compute 10log s(t1)/s(1)
t1=1,2,3…,N (second)while the data (both s and t)are in one minute.
s t
0.05 4.7
0.1 4.8
0.2 4.9
0.1 4.10
0.3 4.11
Could you please guide me?
Thanks,

Best Answer

Since your explanations feel like a puzzle, whats wrong with this?
N = 60; % or N = length(t)
t1 = 1:N; %[sec] timesteps
s = rand(1,N+100); %[any unit] generate random data s
SI = 10*log10(s(t1)/s(1)); %[dB]
plot(t1,SI); xlabel('time [sec]'); ylabel('SI [dB]')