作者zupo (外派越南工作者)
标题Re: [问题] 解三角函数数值问题
时间Tue Nov 12 23:12:54 2013
※ 引述《roy80110 (培特罗)》之铭言:
: 有一函数如下
: tanh(x)*tanh(x*y)+tan(x)*tan(x*y)=0
: 他解出来的图如下
: http://images.plurk.com/ll7j-2U4e35BqWndVMtRQpWRub5.jpg
: (我将u设做x,x/L设做y)
: 但我用下面的指令去跑,跑出来的结果全为0
: syms y
: for x=[1:1:1000]
: Y(1,x) = solve(tanh(x/100)*tanh(x*y/100)+tan(x/100)*tan(x*y/100)==0)
: end
: 不知道为什会这样QQ
: 还是说有其他方法可以解出y?
: 有请各位大大解惑,谢谢
首先,双曲函数基本上是正数,也就是说
若x y 没有负数的话是很难让方程式可以成立的
我有先用图形来看,非常丑
後面用数值解来解
-----------------------------------------------------
function pttex136
global x n
% 图形分析(以下可以删掉)
figure(1)
ezsurfc('tanh(x)*tanh(x*y)')
figure(2)
ezsurfc('tan(x)*tan(x*y)')
figure(3)
ezsurfc('tanh(x)*tanh(x*y)')
hold on
ezsurfc('tan(x)*tan(x*y)')
%
% 数值解
b = length(0.01:0.01:10);
F = zeros(b,2);
x = 0.01:0.01:10;
for n = 1:b
y = fsolve(@agly,1);
F(n,1) = x(n);
F(n,2) = y;
end
F
plot(F(:,1),F(:,2))
function f=agly(y)
global x n
a = x(n);
f = tanh(a).*tanh(a.*y)++tan(a)*tan(a*y);
------------------------------------------------
我觉得x与y条件可以以负数来讨论比较好
--
1.MATLAB programming 2.ASPEN process simulation package
3.FORTRN programming 4.Advance Engineering Mathematics
5.Process Control Theory
6.Chemical Engineering Basic Theory(Kinetic.thermodynamics.transport)
7.Numerical Method and Analysis
8.MATLAB Toolbox.Simulink system basic design
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 113.163.21.45
1F:→ mp19990920:越南有matlab的工作吗? 11/12 23:39
2F:→ zupo:没有.有什麽问题吗? 11/13 00:21