我想求解以下方程的解:
2/(7.8^2+2.9^2/(1+(40/(x-630))^2))^2+2/(7.8^2+2.9^2/(1+(40/(x+630))^2))^2+2/(7.8^2+2.9^2/(1+(40/x)^2))^2-2/(7.8^2+2.9^2*630^2/(630^2+40^2))^2-1/(7.8^4)=0
我编的M文件如下:
function y=feifun(x)
y=2/(7.8^2+2.9^2/(1+(40/(x-630))^2))^2+2/(7.8^2+2.9^2/(1+(40/(x+630))^2))^2+2/(7.8^2+2.9^2/(1+(40/x)^2))^2-2/(7.8^2+2.9^2*630^2/(630^2+40^2))^2-1/(7.8^4);
%x0=0.5;
%k=7.8;
%m=2.9;
%z=40
%h=630;
%调用fsolve求解带参数方程
x0=0;
x=fsolve(@(x)feifun(x),x0);
运行后的错误如下:
??? Input argument "x" is undefined.
Error in ==> fangch at 2
y=2/(7.8^2+2.9^2/(1+(40/(x-630))^2))^2+2/(7.8^2+2.9^2/(1+(40/(x+630))^2))^2+2/(7.8^2+2.9^2/(1+(40/x)^2))^2-2/(7.8^2+2.9^2*630^2/(630^2+40^2))^2-1/(7.8^4);
请问这是什么意思呢?谢谢:)