I have some problem when plotting the graph, anyone can help? Thanks
    3 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Erwin Koman
 el 27 de Jun. de 2015
  
    
    
    
    
    Comentada: Erwin Koman
 el 27 de Jun. de 2015
            This is my code
for x = -10:10
    y = 2^(0.4*x)+5
    plot(x,y,'g')
end
0 comentarios
Respuesta aceptada
  Salaheddin Hosseinzadeh
      
 el 27 de Jun. de 2015
        
      Editada: Salaheddin Hosseinzadeh
      
 el 27 de Jun. de 2015
  
      Hi,
You need to store y first.
x = -10:10;
for i = 1:numel(x)
    y(i) = 2^(0.4*x(i))+5
end
plot(x,y,'g')
Más respuestas (0)
Ver también
Categorías
				Más información sobre Loops and Conditional Statements 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!

