How do i round to two decimals without zeros at the end

조회 수: 6 (최근 30일)
Kamil Kacer
Kamil Kacer 2020년 12월 10일
댓글: Kamil Kacer 2020년 12월 11일
Hi I just want to keed 2 decimal places without those zeros shown at the picture what do I do please I tried round

채택된 답변

Jon
Jon 2020년 12월 10일
편집: Jon 2020년 12월 10일
I think this might do what you want
fprintf('Dog detected at second %0.2f\n',idx(:))
  댓글 수: 5
Rik
Rik 2020년 12월 10일
Ah, yes, I missed that assignment. I thought the variable was not defined in the posted snippet.
Kamil Kacer
Kamil Kacer 2020년 12월 11일
I agree i should hava assing it to some meaningfull name.
I multiplay all frames by 0.1 so I get seconds
0.1 is a step is in which window gets shiftted every iteration.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by