how I can use fprintf for syms
이전 댓글 표시
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
2013년 1월 8일
Are you wanting to print it with all 400 digits?
답변 (1개)
have you tried the following?
fprintf('%3.3e',sscanf(char(z),'%e'))
댓글 수: 2
Walter Roberson
2013년 1월 8일
If you were going to do that, then
fprintf('%3.3e', double(z))
Hassan F
2013년 1월 8일
You're right. Disregard my answer please.
카테고리
도움말 센터 및 File Exchange에서 Operations on Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!