RK method in MATLAB gui giving error message "Function with duplicate name "rigid" cannot be called"
Afficher commentaires plus anciens
Hello i am using 4th order RK method to solve my problem,the subfunction name is rigid.m which will be called in my main function.The main function is inside GUI programme,When i will give values and click push butto it will solve and give me results. so when i have written my subfunction rigid.m ,then main function(which contain RK method)that calls rigid.m under pushbutton it is giving error message "Function with duplicate name "rigid" cannot be called" while running.How to reduce it. When i am typing rigid.m separately and calling in GUI then it is not giving error,but the values used in rigid.m are given by user in GUI window.
Réponses (1)
Image Analyst
le 28 Nov 2015
Modifié(e) : Image Analyst
le 28 Nov 2015
What does this say:
>> which -all rigid.m
Are you sure you don't have rigid defined twice in your main GUI code, or once there plus once as a separate m-file?
5 commentaires
DEBASHIS PANDA
le 28 Nov 2015
DEBASHIS PANDA
le 28 Nov 2015
Image Analyst
le 28 Nov 2015
But your error message says "Function with duplicate name "rigid" cannot be called" so obviously there is a duplicate of it somewhere. Set a breakpoint on the line where you call it and when it stops, issue the which command I asked you to in the command window.
DEBASHIS PANDA
le 28 Nov 2015
Image Analyst
le 28 Nov 2015
Then it is not defined in your code like you thought. If it were in that m-file, you'd see this:
K>> which -all rigid
C:\Users\debashis\Documents\MATLAB\work\rigid.m (rigid) % Local function of RK
Catégories
En savoir plus sur Startup and Shutdown dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!