Error (error in line 42) in using matlab execution (guide compiled) file.

I have made a guide and compile it. When I install its execution file in my laptop it is working well but when I install in others laptop it showing error (error in line 42, which is main function file and can't be edited). help me to solve the problem so that it will distribute to others for use.

5 Commenti

Is it possible to attach the code and .fig ?
sorry, but i cant share my code.. please help me if u could without the code... the error is not in code,some error during compliation.. the gui codes are running well in matlab.. but after compilation when it installed, during opening it shows the error in line 42....
Without seeing the complete error message and the corresponding line of code, it is very unlikely that somebody can help you.
That doesn't make sense. First you say the error is during compilation (that is, when you run mcc to compile your program into a standalone executable). Then you said it happens AFTER compilation when you try to launch your standalone program. Which is it?
And like Jan said, attach the whole error message. Line 42 is just boilerplate guide stuff - not the true cause of the error. There is something in your openingFcn() that is probably causing the problem, like the file you need was not included or you contructed its full filename incorrectly.
My guess is that you have a callback that refers to a function that is not part of the main .m file, and which you have not added to the project. MATLAB cannot always automatically find references to functions when they are coded in callbacks attached to graphics objects or when they are coded as character vectors.

Accedi per commentare.

Risposte (1)

Bruno Luong
Bruno Luong il 26 Set 2018
Modificato: Bruno Luong il 26 Set 2018
Shooting in the dark : Delete the line #42 (that the best I can do to help you).

Categorie

Richiesto:

il 17 Set 2018

Commentato:

il 26 Set 2018

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by