有一个ActiveX函数,我想从MATLAB中调用,例如:
PrintOut([Background], [Append], [Range], [OutputFileName], [From], [To], [Item], [Copies],
[Pages], [PageType], [PrintToFile], [Collate], [FileName], [ActivePrinterMacGX],
[ManualDuplexPrint], [PrintZoomColumn], [PrintZoomRow], [PrintZoomPaperWidth],
[PrintZoomPaperHeight])
然后像下面这样使用:
hdlActiveX = actxserver('Word.Application');
hdlActiveX.PrintOut(opt args, needed args, opt opts, needed args);
PrintOut函数调用中的所有参数都是可选参数。然而,在某些情况下,我需要指定第3、9和10个参数,并将其他所有参数保留为默认值。在通过MATLAB调用的ActiveX函数调用中,有没有可能指定缺失或默认值?在C#中可以这样做,但在MATLAB ActiveX中怎么办?
this.PrintOut(ref Background, ref missing, ref Range, ref missing,
ref missing, ref missing, ref missing, ref Copies,
ref missing, ref PageType, ref PrintToFile, ref Collate,
ref missing, ref ManualDuplexPrint, ref PrintZoomColumn,
ref PrintZoomRow, ref missing, ref missing);
致敬,