help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: plot and graphs


From: Doug Stewart
Subject: Re: plot and graphs
Date: Mon, 3 Sep 2012 14:15:13 -0400



On Mon, Sep 3, 2012 at 12:46 PM, Ben Abbott <address@hidden> wrote:
On Sep 3, 2012, at 7:59 AM, Mahvish Nazir wrote:

> What if we have a function say (cos(t^2))^2*exp(i*t) and we want to plot its integral over the limits -5 to 5? how do we do that?

I apologize if this isn't particularly helpful .... *but* we recently added splinefit() to Octave (not yet included in a released version).  Using this function (see the attached m-file), the result illustrated in the attached pdf was produced.  If you'd like to use this function, you can download splinefit.m at the link below.

        http://hg.savannah.gnu.org/hgweb/octave/file/2dd4f5930108/scripts/polynomial

You'll also need the __splitfit__.m which is in the "private" directory.

Ben


t=-8:.1:8;
y=((cos(t.^2)).^2) .*exp(i*t);
q=cumtrapz(t,y);
plot(t,q,t,y)




_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave




--
DAS

https://linuxcounter.net/user/206392.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]