Borrar filtros
Borrar filtros

Fill missing data NaN

7 visualizaciones (últimos 30 días)
Hozan Sulaiman
Hozan Sulaiman el 24 de Mzo. de 2022
Comentada: Chunru el 25 de Mzo. de 2022
Hi, I've made a test and have some missing data that needs to be filled, does anybody know how I can do that? I've been looking into it and I believe there is a function called fillmissing. I'm just not sure how it could be used.
I appriciate the help .
load ERH2T60073.mat
Filename=ERH2T60073;
FrameRatee=Filename.FrameRate;
subplot(2,2,1);
plot((0:length(Filename.RigidBodies.Positions)-1)/FrameRatee, squeeze(Filename.RigidBodies.Positions(1,:,:)))
legend
xlim([20 120])
ylim([-1500 400])
legend('Surge','Sway', 'Heave')
title('Buoy Displacements')
subplot(2,2,2);
plot((0:length(Filename.RigidBodies.Positions)-1)/FrameRatee, squeeze(Filename.RigidBodies.RPYs(1,:,:)))
legend on
xlim([20 120])
ylim([-6 15])
legend('Roll','Pitch', 'Yaw')
title('Buoy Rotation')
subplot(2,2,3);
plot((0:length(Filename.RigidBodies.Positions)-1)/FrameRatee, squeeze(Filename.RigidBodies.Positions(2,:,:)))
legend on
xlim([20 120])
ylim([-200 500])
legend('Surge','Sway', 'Heave')
title('Floater Displacements')
subplot(2,2,4);
plot((0:length(Filename.RigidBodies.Positions)-1)/FrameRatee, squeeze(Filename.RigidBodies.RPYs(2,:,:)))
legend on
xlim([20 120])
legend('Roll','Pitch', 'Yaw')
title('Floater Rotation')
out_Surge=squeeze(Filename.RigidBodies.Positions(2,:,:));
output_Surge=out_Surge(1,(1:end))';
out_heave=squeeze(Filename.RigidBodies.Positions(2,:,:));
output_Heave=out_heave(3,(1:end))';
out_Roll=squeeze(Filename.RigidBodies.RPYs(2,:,:));
output_Roll=out_Roll(1,(1:end))';
out_Pitch=squeeze(Filename.RigidBodies.RPYs(2,:,:));
output_Pitch=out_Pitch(2,(1:end))';

Respuestas (1)

Chunru
Chunru el 24 de Mzo. de 2022
Editada: Chunru el 24 de Mzo. de 2022
doc fillmissing
fillmissing can be very powerful with various options.
  2 comentarios
Hozan Sulaiman
Hozan Sulaiman el 24 de Mzo. de 2022
Yes, I saw that. I'm not sure how to apply it though.
Chunru
Chunru el 25 de Mzo. de 2022
If you want further help, you need to post a portion of your data with an minimum example.

Iniciar sesión para comentar.

Productos


Versión

R2021b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by