⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 polyn2sympoly.m

📁 多项式拟合的MATLAB工具。只要具有以下几个函数 POLYFITN - A general n-dimensional polynomial fitting tool POLYVALN - An
💻 M
字号:
function sp = polyn2sympoly(polyn)% polyn2sympoly: convert a regression polynomial from polyfitn into a sympoly% usage: sp = polyn2sympoly(polyn)%% arguments: (input)%  polyn - a structure as returned from polyfitn%% arguments: (output)%  sp - A sympoly object%% After conversion into a sympoly, any symbolic operations are% now possible on this form.% % Requirement: The sympoly toolbox, as found on Matlab Central.% http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=9577&objectType=FILE%% See also: polyvaln, polyfit, polyval, sympoly%% Author: John D'Errico% Release: 1.0% Release date: 2/19/06if exist('sympoly','file')~=2  error 'Please download the sympoly toolbox from Matlab Central'endsp = sympoly(0);% Copy over the fields of polyn into spsp.Var = polyn.VarNames;sp.Exponent = polyn.ModelTerms;sp.Coefficient = polyn.Coefficients(:);% Was the list of variable names empty?% If so, then generate a list of names of my own.if isempty(sp.Var)  p = size(polyn.ModelTerms,2);  varlist={};  for i = 1:p    varlist{i} = ['X',num2str(i)];  end  sp.Var = varlist;end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -