how I can use fprintf for syms

10 visualizzazioni (ultimi 30 giorni)
hashem zohdi
hashem zohdi il 8 Gen 2013
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 Commento
Walter Roberson
Walter Roberson il 8 Gen 2013
Are you wanting to print it with all 400 digits?

Accedi per commentare.

Risposte (1)

Hassan F
Hassan F il 8 Gen 2013
Modificato: Hassan F il 8 Gen 2013
have you tried the following?
fprintf('%3.3e',sscanf(char(z),'%e'))
  2 Commenti
Walter Roberson
Walter Roberson il 8 Gen 2013
If you were going to do that, then
fprintf('%3.3e', double(z))
Hassan F
Hassan F il 8 Gen 2013
You're right. Disregard my answer please.

Accedi per commentare.

Categorie

Scopri di più su Symbolic Math Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by