When I try to use the function 'magic(n)', Matlab says that the execution of the script magic is not supported
4 visualizaciones (últimos 30 días)
Steven Lord el 5 de Oct. de 2022
Rename the magic.m file that you've created in the /Users/helloooo/Documents/MATLAB folder. It's preventing MATLAB from accessing the magic function included in MATLAB.
Benjamin Thompson el 5 de Oct. de 2022
If your magic.m file does not have "function" at the top, then it is a script and not a function. Scripts cannot be passed arguments in parenthesis. They would normally share the same workspace as the caller.