필터 지우기
필터 지우기

how I can use fprintf for syms

조회 수: 9 (최근 30일)
hashem zohdi
hashem zohdi 2013년 1월 8일
hello I want to print syms with scinstific model. can you help me?
example:
Function a(n)
digits(400)
syms t
t=n;
z=vpa(t/3);
fprintf('%3,3e',z);
end
with extra thanks
zohdi
  댓글 수: 1
Walter Roberson
Walter Roberson 2013년 1월 8일
Are you wanting to print it with all 400 digits?

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

답변 (1개)

Hassan F
Hassan F 2013년 1월 8일
편집: Hassan F 2013년 1월 8일
have you tried the following?
fprintf('%3.3e',sscanf(char(z),'%e'))
  댓글 수: 2
Walter Roberson
Walter Roberson 2013년 1월 8일
If you were going to do that, then
fprintf('%3.3e', double(z))
Hassan F
Hassan F 2013년 1월 8일
You're right. Disregard my answer please.

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by