PLOT COMMAND USING string arguments
    6 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
I have the following code if true
x = get(text1,'string');
y = get(text2,'string');
axes(plot1);
plot(x,y);
end
but I got and error :
ERROR using Plot invalid first data argument| | the string on text1 is -10:10 and the string in text2 is x.^2
What is wrong?
0 comentarios
Respuesta aceptada
  Kye Taylor
      
 el 12 de Jun. de 2013
        
      Editada: Kye Taylor
      
 el 12 de Jun. de 2013
  
      Maybe try
x = eval(get(text1,'string'));
y = eval(get(text2,'string'));
axes(plot1);
plot(x,y);
Más respuestas (0)
Ver también
Categorías
				Más información sobre Annotations en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

