亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? solve.m

?? 數(shù)學(xué)建模中常用的一些算法用matlab實(shí)現(xiàn)
?? M
字號(hào):
function varargout = solve(varargin)
%求各種類型方程組的解析解, 
%當(dāng)找不到解析解時(shí),將自動(dòng)尋求原點(diǎn)附近的一個(gè)近似解, 并可達(dá)任意精度.
%用法
%   solve('方程1','方程2',...,'方程N(yùn)','變量1','變量2',...,'變量M')
%SOLVE  Symbolic solution of algebraic equations.
%   SOLVE('eqn1','eqn2',...,'eqnN')
%   SOLVE('eqn1','eqn2',...,'eqnN','var1,var2,...,varN')
%   SOLVE('eqn1','eqn2',...,'eqnN','var1','var2',...'varN')
%
%   The eqns are symbolic expressions or strings specifying equations.  The
%   vars are symbolic variables or strings specifying the unknown variables.
%   SOLVE seeks zeros of the expressions or solutions of the equations.
%   If not specified, the unknowns in the system are determined by FINDSYM.
%   If no analytical solution is found and the number of equations equals
%   the number of dependent variables, a numeric solution is attempted.
%
%   Three different types of output are possible.  For one equation and one
%   output, the resulting solution is returned, with multiple solutions to
%   a nonlinear equation in a symbolic vector.  For several equations and
%   an equal number of outputs, the results are sorted in lexicographic
%   order and assigned to the outputs.  For several equations and a single
%   output, a structure containing the solutions is returned.
%
%   Examples:
%
%      solve('p*sin(x) = r') chooses 'x' as the unknown and returns
%
%        ans =
%        asin(r/p)
%
%      [x,y] = solve('x^2 + x*y + y = 3','x^2 - 4*x + 3 = 0') returns
%
%        x =
%        [ 1]
%        [ 3]
%
%        y =
%        [    1]
%        [ -3/2]
%
%      S = solve('x^2*y^2 - 2*x - 1 = 0','x^2 - y^2 - 1 = 0') returns
%      the solutions in a structure.
%
%        S =
%          x: [8x1 sym]
%          y: [8x1 sym]
%
%      [u,v] = solve('a*u^2 + v^2 = 0','u - v = 1') regards 'a' as a
%      parameter and solves the two equations for u and v.
%
%      S = solve('a*u^2 + v^2','u - v = 1','a,u') regards 'v' as a
%      parameter, solves the two equations, and returns S.a and S.u.
%
%      [a,u,v] = solve('a*u^2 + v^2','u - v = 1','a^2 - 5*a + 6') solves
%      the three equations for a, u and v.
%
%      [x,y] = solve('sin(x+y)-exp(x)*y = 0','x^2-y = 2') cannot find
%      an analytic solution, so returns a numeric solution.
%
%   See also DSOLVE.

%   Copyright (c) 1993-98 by The MathWorks, Inc.
%   $Revision: 1.13 $  $Date: 1997/11/29 01:06:35 $

% Set the Explicit solution (for equations of order 4 or less)
% option on in the Maple Workspace.

maple('_EnvExplicit := true;');

% Collect input arguments together in either equation or variable lists.

eqns = [];
vars = [];
for k = 1:nargin
   v = varargin{k};
   if all(isletter(v) | ('0'<=v & v<='9') | v == '_' | v == ',')
      vars = [vars ',' v];
   else
      [t,stat] = maple(v);
      if stat
         error(['''' v ''' is not a valid expression or equation.'])
      end
      eqns = [eqns ',' v];   
   end
end

if isempty(eqns)
   warning('List of equations is empty.')
   varargout = cell(1,nargout);
   varargout{1} = sym([]);
   return
else
   eqns(1) = '{'; eqns(end+1) = '}';
end
neqns = sum(commas(eqns)) + 1;

% Determine default variables and sort variable list.

if isempty(vars)
   vars = ['[' findsym(sym(eqns),neqns) ']'];
else
   vars(1) = '['; vars(end+1) = ']';
end
v = vars;
[vars,stat] = maple('sort',v);
if stat
   error(['''' v ''' is not a valid variable list.'])
end
vars(1) = '{'; vars(end) = '}';
nvars = sum(commas(vars)) + 1;

if neqns ~= nvars
   warning([int2str(neqns) ' equations in ' int2str(nvars) ' variables.'])
end

% Seek analytic solution.

[R,stat] = maple('solve',eqns,vars);

% If no analytic solution, seek numerical solution.

if (isempty(R) & (nvars == neqns))
   [R,stat] = maple('fsolve',eqns,vars);
end

if stat
   error(R)
end

% If still no solution, give up.

if isempty(R) | findstr(R,'fsolve')
   warning('Explicit solution could not be found.');
   varargout = cell(1,nargout);
   varargout{1} = sym([]);
   return
end

% Expand any RootOf.

while ~isempty(findstr(R,'RootOf'))
   k = min(findstr(R,'RootOf'));
   p = findstr(R,'{'); p = max(p(p<k));
   q = findstr(R,'}'); q = min(q(q>k));
   s = R(p:q);
   t = s(min(findstr(s,'RootOf'))+6:end);
   e = min(find(cumsum((t=='(')-(t==')'))==0));
   if isempty(find(commas(t(2:e-1))))
      % RootOf with one argument, possibly an imbedded RootOf.
      [s,stat] = maple('allvalues',s,'dependent');
      if stat
         error(s)
      end
   else
      % RootOf with a good estimate as the second argument.
      s = maple('evalf',s);
   end
   R = [R(1:p-1) s R(q+1:end)];
end

% Parse the result.

if nvars == 1 & nargout <= 1

   % One variable and at most one output.
   % Return a single scalar or vector sym.

   S = sym([]);
   c = find(commas(R) | R == '}');
   for p = find(R == '=')
      q = min(c(c>p));
      t = trim(R(p+1:q-1));  % The solution (xk)
      S = [S; sym(t)];
   end
   varargout{1} = S;

else

   % Several variables.
   % Create a skeleton structure.

   c = [1 find(commas(vars)) length(vars)];
   S = [];
   for j = 1:nvars
      v = trim(vars(c(j)+1:c(j+1)-1));
      S = setfield(S,v,[]);
   end

   % Complete the structure.

   c = [1 find(commas(R) | R == '{' | R == '}') length(R)];
   for p = find(R == '=')
      q = max(c(c<p));
      v = trim(R(q+1:p-1));  % The variable (x)
      q = min(c(c>p));
      t = trim(R(p+1:q-1));  % The solution (xk)
      S = setfield(S,v,[getfield(S,v); sym(t)]);
   end
   
   if nargout <= 1

      % At most one output, return the structure.
      varargout{1} = S;

   elseif nargout == nvars

      % Same number of outputs as variables.
      % Match results in lexicographic order to outputs.
      v = fieldnames(S);
      for j = 1:nvars
         varargout{j} = getfield(S,v{j});
      end

   else
      error([int2str(nvars) ' variables does not match ' ...
             int2str(nargout) ' outputs.'])
   end
end

%-------------------------

function s = trim(s);
%TRIM  TRIM(s) deletes any leading or trailing blanks.
while s(1) == ' ', s(1) = []; end
while s(end) == ' ', s(end) = []; end

%-------------------------

function c = commas(s)
%COMMAS  COMMAS(s) is true for commas not inside parentheses.
p = cumsum((s == '(') - (s == ')'));
c = (s == ',') & (p == 0);

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产亚洲欧美色| 经典一区二区三区| 欧美日韩免费观看一区二区三区| 国产精品国产三级国产aⅴ原创| 91精品国产欧美日韩| 欧美一区二区三区免费| 极品少妇xxxx精品少妇| 国产日韩综合av| 99在线热播精品免费| 一区二区三区中文字幕精品精品| 欧美色图在线观看| 免费在线看成人av| 久久久久久久久岛国免费| caoporen国产精品视频| 亚洲午夜电影网| 91麻豆精品国产无毒不卡在线观看| 美女一区二区视频| 国产女人18水真多18精品一级做| 99re6这里只有精品视频在线观看| 亚洲综合成人在线视频| 日韩一区二区电影| 成人午夜在线播放| 亚洲一二三四区不卡| 欧美大片一区二区三区| 成人黄动漫网站免费app| 亚洲一区视频在线| 精品国产免费人成电影在线观看四季| 人人狠狠综合久久亚洲| 国产嫩草影院久久久久| 欧美性高清videossexo| 久草在线在线精品观看| 亚洲天堂av老司机| 欧美精品高清视频| 国产99精品国产| 亚洲综合精品自拍| 精品日韩99亚洲| 成人的网站免费观看| 午夜精品久久久久久久久| 久久尤物电影视频在线观看| 色综合激情久久| 精品影视av免费| 亚洲精品乱码久久久久久黑人| 欧美一级高清片| caoporn国产一区二区| 免费日韩伦理电影| 中文字幕在线免费不卡| 中文字幕av免费专区久久| 91亚洲国产成人精品一区二区三 | 欧美精品九九99久久| 国产99久久久国产精品| 日韩福利电影在线观看| 国产精品每日更新在线播放网址 | 欧美色图在线观看| 成人性生交大片免费看中文网站| 午夜精品福利一区二区三区av| 日本一区二区免费在线| 欧美伦理视频网站| bt7086福利一区国产| 裸体一区二区三区| 亚洲综合偷拍欧美一区色| 久久久国际精品| 欧美日本不卡视频| 99精品国产视频| 国内不卡的二区三区中文字幕| 亚洲欧美另类久久久精品| 日韩欧美国产午夜精品| 色美美综合视频| 国产福利一区在线观看| 午夜精品久久久久久久| 亚洲丝袜制服诱惑| 久久久久久久久久久久电影| 欧美人与禽zozo性伦| 91免费版pro下载短视频| 国产一区二三区好的| 污片在线观看一区二区| 亚洲情趣在线观看| 久久久国产午夜精品| 欧美一区二区人人喊爽| 日本国产一区二区| 波多野洁衣一区| 国产麻豆91精品| 日本美女视频一区二区| 亚洲资源在线观看| 亚洲人成网站精品片在线观看 | 7777精品伊人久久久大香线蕉经典版下载 | 亚洲在线免费播放| 国产精品女上位| 久久一区二区三区四区| 欧美一区二区啪啪| 欧美二区乱c少妇| 欧美影视一区二区三区| 99免费精品视频| 国产91精品精华液一区二区三区| 久久99精品久久久久久国产越南| 亚洲一区中文在线| 亚洲天堂网中文字| 国产精品第四页| 中文字幕成人av| 国产精品免费aⅴ片在线观看| 久久久91精品国产一区二区精品 | 一区二区在线观看视频| 中文字幕永久在线不卡| 国产精品久久久久久久久免费相片| 久久综合色婷婷| 精品第一国产综合精品aⅴ| 日韩欧美资源站| 日韩三区在线观看| 日韩一区二区在线免费观看| 91精品国产综合久久福利| 欧美高清你懂得| 精品视频一区二区不卡| 欧美三级中文字幕| 欧美群妇大交群中文字幕| 欧美日韩激情在线| 5858s免费视频成人| 91精品国产综合久久久久久漫画| 538prom精品视频线放| 亚洲欧美电影一区二区| 欧美大度的电影原声| 精品美女一区二区| 精品久久人人做人人爽| 精品少妇一区二区三区视频免付费| 欧美成人欧美edvon| 精品久久久久久亚洲综合网 | 91精品国产91久久久久久一区二区| 欧美另类videos死尸| 欧美日精品一区视频| 欧美丰满少妇xxxxx高潮对白| 欧美精品乱码久久久久久按摩| 欧美一区二区三区的| 欧美mv和日韩mv国产网站| 国产性色一区二区| 中文字幕精品一区二区三区精品| 国产精品久久777777| 一区二区三区欧美视频| 亚洲资源在线观看| 日韩av一区二区在线影视| 久久精品国产99久久6| 国产一区二区伦理| av高清久久久| 欧美午夜在线一二页| 69av一区二区三区| 国产亚洲精品福利| 亚洲欧美aⅴ...| 日韩国产欧美在线播放| 国产一区二三区好的| 一道本成人在线| 欧美日韩亚洲综合一区二区三区| 欧美日韩国产小视频| 欧美变态口味重另类| 国产欧美日韩精品a在线观看| 中文字幕一区在线| 亚洲成人中文在线| 狠狠狠色丁香婷婷综合激情| 福利一区福利二区| 欧美午夜精品一区二区蜜桃| 欧美一区二区久久| 国产精品日韩成人| 午夜久久久久久久久| 激情欧美一区二区| 91麻豆蜜桃一区二区三区| 欧美日韩一本到| 欧美激情在线一区二区| 亚洲午夜成aⅴ人片| 国产一区二区成人久久免费影院 | 日本不卡一区二区| 国产精品一级黄| 欧美曰成人黄网| 久久综合久久99| 亚洲精品videosex极品| 久久成人久久爱| 99久久婷婷国产综合精品电影| 欧美日韩高清一区| 欧美高清在线精品一区| 性欧美大战久久久久久久久| 国产激情91久久精品导航| 欧美图片一区二区三区| 日本一区二区综合亚洲| 午夜精品福利久久久| 成人小视频在线观看| 日韩一级片网站| 亚洲视频香蕉人妖| 韩国精品主播一区二区在线观看 | 日韩美女视频一区二区 | 99久久久国产精品免费蜜臀| 欧美一区二区美女| 亚洲精品免费在线观看| 国产激情偷乱视频一区二区三区 | 日韩欧美一区中文| 亚洲免费观看视频| 国产精品影视在线观看| 欧美群妇大交群中文字幕| 亚洲图片你懂的| 国内国产精品久久| 欧美精品在线观看一区二区| 综合久久一区二区三区| 国产一二三精品| 欧美一区二区三区日韩| 亚洲免费av网站| 国产suv精品一区二区883|