Matlab fails to create plots when called from a function
Mostrar comentarios más antiguos
Hi there,
Whenever I launch the following code:
disp("Hello World")
x=0:0.01:10;
test_plot(x)
With test_plot() defined as such:
function test_plot(x)
plot(x,sin(x))
I get the following error message:
Error using gobjects (line 63) Inputs must be scalar numeric or a vector of array dimensions.
Error in newplot (line 47) fig = gobjects(0);
Error in test_plot (line 2) plot(x,sin(x))
Error in test (line 3) test_plot(x)
I am running Matlab 2017a on a Linux Mint 18 machine.
Anyone knows how to fix this?
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Creating, Deleting, and Querying Graphics Objects 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!