error for subplot command

11 visualizaciones (últimos 30 días)
Erika
Erika el 15 de Feb. de 2015
Editada: salman el 20 de En. de 2023
The following command only plots the first subplot and gives the ERROR message:
Undefined function 'suplot' for input arguments of type 'double'.
Error in subplots (line 10) suplot(3,1,2);
I can substitute any of the y data sets for the first subplot command and they plot fine. Any ideas?
Thanks!
CODE:
x=mdio08_pos;
y1=mdio08_depth;
y2=mdio06_depth;
y3=mdio05_depth;
figure
subplot(3,1,1);
plot(x,y1)
suplot(3,1,2);
plot(x,y2)
suplot(3,1,3);
plot(x,y3)
  2 comentarios
Naveen Kumawat
Naveen Kumawat el 13 de Ag. de 2016
Sorry but I have same error.... I think this is path error. Because first time when it created it worked after reload it is not working. if you got solution then tell me. thanks in advance
Jagadeesan M
Jagadeesan M el 11 de Mayo de 2022
Here I get an error and I don't know how to clear it. Please help me to clear that error

Iniciar sesión para comentar.

Respuesta aceptada

Star Strider
Star Strider el 15 de Feb. de 2015
Typo!
See if this improves things:
x=mdio08_pos;
y1=mdio08_depth;
y2=mdio06_depth;
y3=mdio05_depth;
figure
subplot(3,1,1);
plot(x,y1)
subplot(3,1,2);
plot(x,y2)
subplot(3,1,3);
plot(x,y3)
  3 comentarios
Star Strider
Star Strider el 15 de Feb. de 2015
My pleasure!
Not embarrassing at all. Everyone who ever dared put fingers to a computer keyboard has had the same (sometimes frustrating) experience, especially since we also read what we want to read, which is not always what we typed.
Sein Jeong
Sein Jeong el 27 de Sept. de 2016
Omg I had exactly the same typo in the second 'sub'plot Even after reading your answer I had to think for a minute where the typo could be. Thanks

Iniciar sesión para comentar.

Más respuestas (1)

Raunik kumbhare
Raunik kumbhare el 6 de Feb. de 2022
"Execution of script subplot as a function is not supported: "
I am getting this error at the time of execution.
Any idea?
% Plotting Sin graph
x=linspace(0,4*pi,100);
y=sin(x);
plot(y)
stem(y)
title('Sin graph')
subplot(2,1,1);
% Plotting exp(-x/3)*sinx graph
subplot(2,1,2);
y1=exp(-x/3);
y2=y1.*y;
plot(y2)
  2 comentarios
Steven Lord
Steven Lord el 6 de Feb. de 2022
Likely you've created or downloaded a subplot.m that's taking precedence over the function included in MATLAB. To check this show what the output of the following command is:
which -all subplot
/MATLAB/toolbox/matlab/graph2d/subplot.m
If you have a different subplot.m rename it.
salman
salman el 20 de En. de 2023
Editada: salman el 20 de En. de 2023
@Steven Lord I have the same one and still have that error. Keeping in mind that it was working fine before.
what should I do?

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by