九州算术数学论坛's Archiver

wca221 发表于 2007-5-19 01:33

紧急求救!!!!!!!!!!!

高手来看看,这是什么问题啊??????
syms x;
f=0.4;
x1=0.015;
x2=0.003;
g=10;
pii=3.1415926;
mome_v=0;
for w=35:50%35是上限,50是下限,你们自己改。
    %to get fik
    fy=8*x2*w*w*(sin(x)+x1/16/x2)^2 - 4*x2*w*w - x1*x1*w*w/32/x2-f*g;
        fy=subs(fy);
        fik=solve(fy,'x');
        fik=subs(fik);
        fik=fik(1)*isreal(fik(1))+fik(2)*isreal(fik(2));%如果用我编写的二分法程序mysolve,则 fik=mysolve(fy,xa,xb); 其中[xa,xb]是解的范围        %to get fim
        fy=-w*x1*(cos(x)-cos(fik))-2*w*x2*(sin(2*x)-sin(2*fik))-f*g/w*(x-fik);
            fy=subs(fy);
            fim=solve(fy,'x');
            fim=subs(fim)
end
Warning: Explicit solution could not be found.
> In solve at 140
  In sym.solve at 49
??? Function 'eval' is not defined for values of class 'double'.

Error in ==> eval at 44
  [varargout{1:nargout}] = builtin('eval', varargin{:});

Error in ==> sym.double at 45
D = reshape(eval(X),siz);

Error in ==> sym.subs at 66
if isempty(vars), NEWf = double(OLDf); return, end

页: [1]

Powered by Discuz! Archiver 6.1.0  © 2001-2007 Comsenz Inc.