User-defined function is "unrecognized" in command window.
조회 수: 24 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
galaxy
2019년 11월 5일
You copy only print_list function to other file and save print_list.m in Matlab
It will be OK
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!