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
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일

0 개 추천

have you tried the following?
fprintf('%3.3e',sscanf(char(z),'%e'))

댓글 수: 2

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.

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

질문:

2013년 1월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by