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 个)

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 个评论

If you were going to do that, then
fprintf('%3.3e', double(z))
You're right. Disregard my answer please.

请先登录,再进行评论。

Community Treasure Hunt

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

Start Hunting!

Translated by