Make matlab use a function from a certain toolbox
Mostra commenti meno recenti
I want to use a function ('dist' for quaternions) from an installed toolbox. Matlab obviously uses another function with the same name and throws an error 'Unable to use a value of type 'quaternion' as an index.'
How do I include a certain toolbox and make matlab use this specific function from that toolbox? Or does anybody has any idea why the function 'dist' is not working with two quaternions?
3 Commenti
Mariella Dreißig
il 9 Set 2019
Rik
il 9 Set 2019
This thread might help solve your issue, although it should already sort this out automatically. What does which dist -all return?
Mariella Dreißig
il 10 Set 2019
Risposta accettata
Più risposte (1)
Walter Roberson
il 10 Set 2019
0 voti
If dist is a variable then the problem is not with MATLAB using the "wrong" function.
The best way to solve this problem is to rename your variable so it is not the same as the name of any function you need to call.
The second best way is to drop in a small function that you can pass your arguments into and which calls the function dist. Since it would be in a different workspace, it would not "see" the variable dist to have a problem with (unless you were to for some reason name a function parameter dist, and the cure for that problem is Don't Do That.)
1 Commento
Mariella Dreißig
il 10 Set 2019
Categorie
Scopri di più su Platform and License in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!