[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: diff(x) question
From: |
Joao Cardoso |
Subject: |
Re: diff(x) question |
Date: |
Tue, 19 Jan 1999 12:28:57 +0000 |
El Jeffo wrote:
>
> 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?
Try the enclose `diffn'
Joao
>
> Thanks :)
>
> Jeff
--
Joao Cardoso | e-mail: address@hidden
INESC, R. Jose Falcao 110 | tel: + 351 2 2094322
4050 Porto, Portugal | fax: + 351 2 2008487
diffn.m
Description: Binary data