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

2 views (last 30 days)

Show older comments

f(x)=5x^2+9x+2

G(x)=3x+12

##### 1 Comment

James Tursa
on 22 Feb 2018

Edited: James Tursa
on 22 Feb 2018

### Answers (2)

Roger Stafford
on 23 Feb 2018

x = linspace(-10,10);

f = 5*x.^2+9*x+2;

G = 3*x+12;

plot(x,f,'r-',x,G,'g-')

##### 2 Comments

### See Also

### Categories

### Community Treasure Hunt

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

Start Hunting!