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!