optimization toolbox

源代码在线查看: diff.m

软件大小: 935 K
上传用户: jhjfjh22544
关键词: optimization toolbox
下载地址: 免注册下载 普通下载 VIP

相关代码

				function X = diff(varargin)
				% DIFF (overloaded)
				
				% Author Johan L鰂berg
				% $Id: diff.m,v 1.2 2006/07/13 19:40:59 joloef Exp $
				
				Y = varargin{1};
				X = Y;
				X.basis = [];
				for i = 1:size(Y.basis,2)
				    base = reshape(full(Y.basis(:,i)),X.dim);
				    base = diff(base,varargin{2:end});
				    X.basis = [X.basis sparse(base(:))];
				end
				X.dim = size(base);
							

相关资源