Filter löschen
Filter löschen

Fill missing data NaN

7 Ansichten (letzte 30 Tage)
Hozan Sulaiman
Hozan Sulaiman am 24 Mär. 2022
Kommentiert: Chunru am 25 Mär. 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))';

Antworten (1)

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

Melden Sie sich an, um zu kommentieren.

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by