"Error in myexcelfunctions.myexcelfunctionsclass.1_0: Input argument ""x"" is undefined. Error in => doubleinput.m at line 2"
6 views (last 30 days)
Show older comments
Hi guys, I am trying out Matlab Builder Ex examples and I have been getting this error. I am using Matlab 2011a and referencing User Guide for Matlab Builder Ex 2 revised in April 2011. On page 138 (Chapter 5), there are three functions - doubleit, incrementit and powerit. I am getting the error " *"Error in myexcelfunctions.myexcelfunctionsclass.1_0: Input argument ""x"" is undefined. Error in => doubleinput.m at line 2" * " when I am trying to deploy the functions as Excel add-ins. Here is my step-by-step history:
1) Write code for three functions as separate Matlab scripts. 2) Open deploytool. 3) Type in project name as myexcelfunctions. Select target as Excel-AddIn. 4) In Advanced setting, click on "Register the resulting component for you only on the development machine" and close the window. 5) Rename class as "myexcelfunctionsclass" and add three files. 6) Click on "Build". "Build" is successful and I can see the following files in "distrib" folder - .bas file, .dll file and readme.txt 7) I copy the these files to a standard place for use with Microsoft Excel and register .dll file. Registration is successful. 8) I open new Excel Sheet. Click on "Developer" Ribbon and then "Visual Basic" button. Click on "Import File" to import .bas file. After importing the file, I can see some VBA code that was generated automatically by MATLAB.
It is mentioned in points 7 and 8 of tutorial that now I can test the code in same excel file. When I try to do it, I get the above error - *"Error in myexcelfunctions.myexcelfunctionsclass.1_0: Input argument ""x"" is undefined. Error in => doubleinput.m at line 2" *.
Please help. I have searched online for solution to these problems but I did not find any satisfactory answer. Am I missing something?
Thanks for your help!
Have attached a .txt file for your reference. The file contains MATLAB generated VBA Code.
When I run the code for doubleinput() in debugging mode, VBA executes "Call myexcelfunctionsclass.doubleinput(1, output, x)" and jumps to error handle to give above error. The same error occurs when I try to run other two functions.
0 Comments
Answers (0)
See Also
Categories
Find more on Data Export to MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!