1

I'm trying to get matlab to shorten the answer into scientific notation but it continues to display long numbers.

Here is my matlab script:

syms E;
kb=8.617e-5; %eV/k
h=4.136e-15; %eV*s
Ts=5760; %k
q=1; %ev
c=3.0e8; %m/s
theta_s=atan(7e8/1.5e11); %rad

format short
Il_per_area = (q*pi/2)*(1-cos(2*theta_s))*int(((2/h^3*c^2)*E^2)/(exp(E/(kb*Ts-1))),E)

This is the result matlab gave me:

Il_per_area =

(52508430427297951419542428146127404493579145286547868195529063488882991519987*exp((2251799813685248*E)/1134143295600563)*((5070602400912917605986812821504*E^2)/1286281014955706024710845916969 - (4503599627370496*E)/1134143295600563 + 2))/2361183241434822606848

Can someone help me.

4

1 回答 1

3

这就是 Matlab 处理符号表达式的方式。您可以尝试替换 E 的值

subs(Il_per_area, 3.2)

或者更确切地说,您希望在带有符号 E 的答案中看到较短的参数:

添加一行可变精度算术 (VPA)

vpa(Il_per_area,4)

答案是

ans =

2.223e55*exp(1.985*E)*(3.942*E^2 - 3.971*E + 2.0)
于 2013-09-14T23:29:57.870 回答