function m = subsasgn(m,s,a)
%SUBSREF overloads the subscript reference operator
%    
%    

%_MAN_PAGE_BEGIN
%
%   @purpose  overloads the subscript reference operator.
%
%	@synopsis m.property = value
%	@description lets the user assign the value of a property using a classical assignation.
%	Assignations of the type m.property{subpart}.subpropertie(subsubpart) = something work as well. 
%
%
%_MAN_PAGE_END     

%   Copyright (c) 1998 by Antoine Duchateau			
%	$Revision: 0.1$  $Date: 10/06/98 14:46
%
%	All rights reserved

if (size(s,2)>1),
	val = subsref(m,s(1));
	val = subsasgn(val,s(2:end),a);
	m = subsasgn(m,s(1),val);
else
	if s(1).type=='.',
		set(m,s(1).subs,a);
	end
end
