[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## diff(x) question

**From**: |
El Jeffo |

**Subject**: |
diff(x) question |

**Date**: |
Mon, 18 Jan 1999 23:13:52 -1000 (HST) |

Gosh, the subscribe to this list was faster than I thought :)
Perhaps you folks can help me out.
Say I have the following:
t=[1:.1:10]
x=sin(t)
and I want to plot the derivative of sin(t) (but I want to compute it)
I tried
y=diff(x)
and then plot(t,x,t,y) yields me an error message that states the
the vector sizes must be the same.. so I did
plot(t,x,[1.1:.1:10],y)
and it worked, but the y is really small and never goes beyond .1 in
value. Do you think you could point me in the right direction?
I guess I'm differentiating wrong, how should this really be done?
Thanks :)
Jeff

**diff(x) question**,
*El Jeffo* **<=**