MATLAB: Is the VBA code in the “Spectral Analysis Example” in the documentation for MATLAB Builder for .NET 2.0 (R2006a) correct

analysisascomexampleMATLAB Builder NEmwutilnetobjectpublicspectraltheutilvba

The VBA code in the “Spectral Analysis Example” does not look correct. The line
Public theUtil as MWUtil object
does not appear to be the correct syntax for creating an MWUtil object.

Best Answer

The documentation for “Spectral Analysis Example” in MATLAB Builder for .NET 2.0 (R2006a) has been fixed in MATLAB Builder for .NET 2.1 (R2006b).
If you are using MATLAB Builder for .NET 2.0, change the line
Public theUtil as MWUtil object
to read:
Public theUtil as MWUtil