'Execution of script contour as a function is not supported'
Mostrar comentarios más antiguos
trying to plot a compressor map with contours, when trying to run my code the error 'Execution of script contour as a function is not supported' shows up.
what does this mean?
my code fo the contour plot is
x = mdot(1,:,1);
y = PR(1,:,1);
[X,Y] = meshgrid(x,y);
Z = e(1,:,1);
contour(X,Y,X)
mdot, PR and e are all 1,5,5 doubles
the error also occurs when trying to run any of the contour examples from matlab.
Respuestas (1)
Fangjun Jiang
el 22 de Mzo. de 2022
You must have a contour.m in the path that is shadowing the built-in function contour(). run
which -all contour
4 comentarios
Finlay Macdonald
el 22 de Mzo. de 2022
Walter Roberson
el 22 de Mzo. de 2022
At the MATLAB command line enter the command
which -all contour
The first one you see is likely one created by yourself, and you will have to rename or delete that file.
My guess is that that code you have shown us, you put into a file that you named contour.m but calling it contour.m interfers with being able to call Mathwork's contour function.
Fangjun Jiang
el 22 de Mzo. de 2022
Run the above command in MATLAB Command Window. It will show you multiple files. You need to rename your own contour.m to something else to avoid the name conflict.
Finlay Macdonald
el 22 de Mzo. de 2022
Categorías
Más información sobre Contour Plots en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!