0

I'm trying to draw a graph of the function

 h(t)  =  200 - (1/2)9.8t^2 + 8t

but I keep receiving unexpected symbol errors when I do:

curve(200 - (1/2)*(9.8)t^2 + 8*t)

Any idea how to graph it correctly, and why I received the errors?

Thilo
  • 8,827
  • 2
  • 35
  • 56
user3000205
  • 15
  • 1
  • 2
  • What are the errors you have received? It will also be helpful if you can provide a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) w/ some sample data & what you have tried thus far. – gung - Reinstate Monica Nov 17 '13 at 20:35

1 Answers1

2

There are two problems with your command:

  1. curve expects the variable to be named x, not t.
  2. The multiplication sign * is missing between (9.8) and x.

Try

curve(200 - (1/2)*(9.8)*x^2 + 8*x)

Giving

enter image description here

dardisco
  • 5,086
  • 2
  • 39
  • 54
Thilo
  • 8,827
  • 2
  • 35
  • 56