Fill missing data NaN
7 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/939659/image.jpeg)
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))';
0 commentaires
Voir également
Catégories
En savoir plus sur Legend dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!