利用matlab生成的com组件时 
set s=new matlabclass时报错:“expected user-defined type ,not project“ 
代码: 
m文件: 
function s=imoverlay(pathBase,pathInput,pathOverlay) 
f=imread(pathBase); 
g=imread(pathInput); 
h=g-f; 
imwrite(h,pathOverlay); 
s=1; vb调用: 
Private Sub Command1_Click() 
Set stif = New Moverlay ‘Moverlay 为class名
Dim a, b, c As Variant 
a = "G:\123.tif" 
b = "G:\tif_123.tif" 
c = "G:\newtif.tif" 
Call stif.IMoverlay(1, a, b, c) 
End Sub
谢谢了~