用 ^ 计算幂

Calculating power with ^

我正在尝试对图表建模,如附图所示。我正在建模的方程式也显示在图像中。

我的编码是,

sigmafu=1660; 
phi=0.0:0.01:90;
e=2.7183; %I searched on internet to find e value of Euler number and I 
%found this. 
%Dont know whether MATLAB bydefault has value of e, like MATLAB has value 
%pi.
pw= (-0.3)*phi*(180/180);
F=sigmafu*(0)* 2.7183^(pw);
plot (phi,F)

我使用上述编码时出现以下错误:

Error using ^. Inputs must be a scalar and a square matrix. To compute elementwise POWER, use POWER (.^) instead.
Error in myeqsetlin (line 126): F=sigmafu*(0)* 2.7183^(pw);

谁能帮我改一下代码?另外,MATLAB是否有默认值e(欧拉数),如果有我该如何使用?

您可以使用 exp(1) 获取 e 的值。意思是 e^1.

sigmafu = 1660; 
phi = 0.0:0.01:90;
pw = -0.3*phi*pi/180;
F = sigmafu*exp(pw);
plot(phi,F)