User-defined function is "unrecognized" in command window.
Afficher commentaires plus anciens
This print_list function works in the script, but it gives the error message "Unrecognized function or variable 'print_list'" in the command window. I am having the same problem with all my other user-defined functions. How can I fix it?
global list list_idx;
list = ["1st", "2nd", "0"];
list_idx = [1, 1, 0];
print_list;
function var = print_list()
global list list_idx;
L = logical(list_idx);
var = list(L);
disp(var);
end
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Workspace Variables and MAT Files dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!