From help-octave-request at bevo dot che dot wisc dot edu Tue Jan 19 01:09:48 1999 Subject: diff(x) question From: El Jeffo To: help-octave at bevo dot che dot wisc dot edu 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