force Scientific notation when using symunit

15 vues (au cours des 30 derniers jours)
Mikkel Star
Mikkel Star le 26 Mai 2021
hello format short and all the other formate solutions does not work when using units so how do i force it to show the result in scientific notation
as i only need enginers notation of scientific notation for all my work with or without units it is sort of essential to my work with matlab
so please help
u = symunit
Z=2
m=85.468*u.g/u.mol
%m=85.468*u.g/mol
a=5.605*u.Ao
NAVO=6.02214076*10^(23)*u.mol^(-1)
now using all these format options does not make the result to be shown in sicentific notation
format short E
format shortEng
format compact
format short e
den = Z*m/(NAVO*a^3) % is a fraction
den = unitConvert(den,u.g/(u.cm^3)) % is a fraction
simplify(vpa(den)) % is a decimal number

Réponses (0)

Catégories

En savoir plus sur Mathematics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by