Convert whole numbers to decimals
조회 수: 1 (최근 30일)
이전 댓글 표시
I have the following numbers that are being read in Matlab but they need to be converted to decimals 100th inches. 0, 90, 9, 224, 33, 0, 10, 18. With two columns These numbers are whole numbers in a txt file. First,
fid=fopen('snowfall.txt','r');
A=fscanf(fid,'%d %d %d %d %d %d %d %d',[2 8]);
How do I convert the numbers to decimals.
댓글 수: 1
답변 (1개)
Sulaymon Eshkabilov
2022년 11월 24일
One easy to display option after reading your data which are whole numbers is using /* operations, e.g.:
A = [0, 90, 9, 224; 33, 0, 10, 18];
A = A/100*100
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!