필터 지우기
필터 지우기

How to make the matrix entries upto 10th decimal

조회 수: 13 (최근 30일)
sakshi ahuja
sakshi ahuja 2016년 4월 26일
답변: Jan 2016년 4월 26일
I want to display matrix in the form of: W1=[6.5862 2.7719 3.3640 2.6502 0.4356 0.3338 2.3610e+005] but due to last element of the matrix it is displaying: W1= 1.0e+005 *[0.0001 0.0000 0.0000 0.0000 0.0000 0.0000 2.3610]. How can i increase the entries value upto 10th decimal or more than that.

채택된 답변

Jan
Jan 2016년 4월 26일
The elements are all stored in double format with about 15 digits. You only observe another number of digits in the display in the command window. But this concerns the text output only. Try:
format long g
disp(W1)
Or:
fprintf('%.10f ', W1)
fprintf('%.10g ', W1)

추가 답변 (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