Hi,
On itself one way of doing this is:
lines(seq(-4,4,0.1),sapply(seq(-4,4,0.1),function(t)0.83*t-0.44*t^2))

The curve does not fit in the scale, however. Are you sure the formula is
correct? Then you have to adapt the scale:

plot.new()
plot.window(xlim=c(-4,4), ylim=c(-10,16))
axis(1)
axis(2)
t<--4:4
y<-c(5,7,10,13,15,16,14,12,11)
lines(t,y,type="l")

lines(seq(-4,4,0.1),sapply(seq(-4,4,0.1),function(t)0.83*t-0.44*t^2))
)



2013/12/15 水静流深 <1248283536@qq.com>

> t<--4:4
> y<-c(5,7,10,13,15,16,14,12,11)
> plot(t,y,type="l")
>
> how can i add a curve  y=0.83*t-0.44*t^2  in the graph?
>         [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help@r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



-- 


-------------------
dr F.H.G. (Frans) Marcelissen
DigiPsy (www.DigiPsy.nl <http://www.digipsy.nl/>)
Pomperschans 26
5595 AV Leende
tel: 040 2065030/06 2325 06 53
skype adres: frans.marcelissen
email: frans.marcelissen@digipsy.nl

	[[alternative HTML version deleted]]

