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

📄 mpower.m

📁 HERE IS A GOOD PSO TOOL BOX
💻 M
字号:
function r = mpower(x,y)% MONOMIAL/MPOWER  Implement '^' for a monomial.%if( ~isnumeric(y) )  error('The exponent in the power must be a numerical value.');endif( length(x) > 1 )  error(['Cannot raise vectors or matrices of monomials to a power.' char(10) ...         'Try pointwise power which is defined for vectors and matrices.'])endif( length(y) > 1 )  error(['Cannot use exponents that are vectors or matrices with a regular power.'...         char(10) 'Try pointwise power which is defined for vectors and matrices.'])endif( y == 0 )   % return scalar 1 if the exponent is zero  r = 1;else  r = monomial;  r.c = (x.c)^y;  r.a = (x.a)*y;  r.gpvars = x.gpvars;end

⌨️ 快捷键说明

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