Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Error Using a Variable Number of Outputs

If your add-in throws the error:

Error in myfunc: Object reference not set to an instance of an object

The likely cause is that the MATLAB® function used by the add-in returns a variable number of outputs.

Add-ins using code run on a MATLAB Production Server™ instance do not support MATLAB functions that return a variable number of outputs. You can either rewrite your MATLAB function to return a fixed number of outputs, or you can create an add-in that runs locally to your Excel® installation.

Was this topic helpful?