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 Kommentar

Walter Roberson
Walter Roberson am 8 Jan. 2013
Are you wanting to print it with all 400 digits?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Hassan F
Hassan F am 8 Jan. 2013
Bearbeitet: Hassan F am 8 Jan. 2013

0 Stimmen

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

2 Kommentare

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

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 8 Jan. 2013

Community Treasure Hunt

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

Start Hunting!

Translated by