필터 지우기
필터 지우기

Many Decimals with vpa()

조회 수: 4 (최근 30일)
Maxime Rivard
Maxime Rivard 2017년 12월 5일
답변: Walter Roberson 2017년 12월 5일
I understand vpa can give my many decimals of pi, for example. But what if I want to input myself a number with many digits, say 1.282884769975957739739957395739? If I type vpa(1.2828847699759577397399573957,30), I get 1.28288476997595779494076850824, which is not the number I want. I ultimately just want to do calculations on a precise initial number.
Thanks.

채택된 답변

Walter Roberson
Walter Roberson 2017년 12월 5일
vpa('1.2828847699759577397399573957',30)
Better yet,
x = sym('1.2828847699759577397399573957');
vpa(x, 30)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by