Borrar filtros
Borrar filtros

I want to plot F(x) and G(x) in same graph for x=(-10,10) how can I do this?

2 visualizaciones (últimos 30 días)
f(x)=5x^2+9x+2
G(x)=3x+12
  1 comentario
James Tursa
James Tursa el 22 de Feb. de 2018
Editada: James Tursa el 22 de Feb. de 2018
What have you done so far? What specific problems are you having with your code? Do you know how to evaluate polynomials for a vector input? Do you know how to plot?

Iniciar sesión para comentar.

Respuestas (2)

Star Strider
Star Strider el 23 de Feb. de 2018
See the documentation on Anonymous Functions (link) and the linspace (link) function.

Roger Stafford
Roger Stafford el 23 de Feb. de 2018
x = linspace(-10,10);
f = 5*x.^2+9*x+2;
G = 3*x+12;
plot(x,f,'r-',x,G,'g-')

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by