optimization toolbox

源代码在线查看: mtimes.m

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

相关代码

				function F = mtimes(X,Y)
				% mtimes (overloaded)
				
				% Author Johan L鰂berg
				% $Id: mtimes.m,v 1.2 2006/07/25 12:57:08 joloef Exp $
				
				Xd = isa(X,'ndsdpvar');
				Yd = isa(Y,'ndsdpvar');
				
				if Xd & Yd
				    error('nD SDPVAR objects can not be multiplied');
				end
				
				if ~Xd
				    if isa(X,'double')
				        if prod(size(X)) == 1
				            F = Y;
				            F.basis = F.basis*X;
				        else
				            error('Only scalar multiplication allowed on nD objects');
				        end
				    end
				end
				
				if ~Yd
				    if isa(Y,'double')
				        if prod(size(Y)) == 1
				            F = X;
				            F.basis = F.basis*Y;
				        else
				            error('Only scalar multiplication allowed on nD objects');
				        end
				    end
				end			

相关资源