필터 지우기
필터 지우기

Fill missing data NaN

조회 수: 7 (최근 30일)
Hozan Sulaiman
Hozan Sulaiman 2022년 3월 24일
댓글: Chunru 2022년 3월 25일
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))';

답변 (1개)

Chunru
Chunru 2022년 3월 24일
편집: Chunru 2022년 3월 24일
doc fillmissing
fillmissing can be very powerful with various options.
  댓글 수: 2
Hozan Sulaiman
Hozan Sulaiman 2022년 3월 24일
Yes, I saw that. I'm not sure how to apply it though.
Chunru
Chunru 2022년 3월 25일
If you want further help, you need to post a portion of your data with an minimum example.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Legend에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by