Simulink timeseries conversion into matrix
16 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
I have a timeseries of Y positon output from simulink block. Y in converging to the steady state from t = 0 to t =50. I want to calculate the root mean square deviation(RMSD) of every second of input Y while simulating and check when it drops below the set thrushhold of RMSD. How to create a matrix of elements for each second and calculate the RMSD. When thrushhold for RMSD is reached output from matlab function should be 1 else 0.
This is how I post processed the data after importing into matlab from simulink. The same has to be implemented in simulink.
time = Y_position.Data(3500:end,1);
v = Y_position.Data;
mean = 2.063;
a = (time + mean);
N = size(time);
for ii = 1:N
b(ii,1) =(a(ii,1) )^2;
sumb = sum(b);
end
c = sum(a);
MSE = sumb/N(1,1) % Mean square error (MSE)
RMSD_ = sqrt(MSE) % Root Mean square Deviation (RMSD)
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Matrix Indexing finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!