MatLab 上的非线性变量图
Graph of non-linear variable on MatLab
我想从这个非线性函数得到一个 图 (e0, b):
C==(2*e0.*pi)/(log(b/a))
我试过那个代码,但没有用:
a = 1*10^-3;
C=0.0001*10^-3;
e0=1:0.1*10^-3:7;
fsolve(C==(2*e0.*pi)/(log(b/a)),b);
plot(e0,b)
我怎样才能在 MatLab 中得到这张图?
没有图表,因为 e0 = Inf
。这样做的原因是如果你重新排列你的等式,你有:
b = a*exp(2*pi*e0/C);
e0
在 1
和 7
之间并且 C
为 1e-7
,您的 be 值将为(忽略 a
)在 exp(2*pi*1e7)
和 exp(14*pi*1e7)
之间。你猜怎么着?
>> exp(2*pi*1e7)
ans = Inf
所以要么你的值是错误的,你的方程式是错误的,要么是没有解决方案。
我想从这个非线性函数得到一个 图 (e0, b):
C==(2*e0.*pi)/(log(b/a))
我试过那个代码,但没有用:
a = 1*10^-3;
C=0.0001*10^-3;
e0=1:0.1*10^-3:7;
fsolve(C==(2*e0.*pi)/(log(b/a)),b);
plot(e0,b)
我怎样才能在 MatLab 中得到这张图?
没有图表,因为 e0 = Inf
。这样做的原因是如果你重新排列你的等式,你有:
b = a*exp(2*pi*e0/C);
e0
在 1
和 7
之间并且 C
为 1e-7
,您的 be 值将为(忽略 a
)在 exp(2*pi*1e7)
和 exp(14*pi*1e7)
之间。你猜怎么着?
>> exp(2*pi*1e7)
ans = Inf
所以要么你的值是错误的,你的方程式是错误的,要么是没有解决方案。