利用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
谢谢了~
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
谢谢了~
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货