[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Zero crossing
From: |
James Sherman Jr. |
Subject: |
Re: Zero crossing |
Date: |
Mon, 21 Jan 2013 16:34:05 -0500 |
On Mon, Jan 21, 2013 at 3:13 PM, expikx <address@hidden> wrote:
> hey all,
>
> i´ve got some problems with the determination of zero points of a fitted
> function.
>
> this is what i have done:
>
> 1) data input with A=load("-ascii", "file.csv")
>
> 2) naming my data with x = A(:,1) and y = A(:,2)
>
> 3) fitting with P=polyfit(x,y,4)
>
> 5) S=polyval(P,x) to get the fitting polynome (am i right?)
>
> for my next step in need the zero crossing point of my fitted function. By
> typing roots(S) i just get imaginary solutions, but there are real
> solutions! I also tried the command fzero and nothing happens :-(
>
> may you help me?
>
> thx a lot
>
> cheers,
> expikx
>
>
>
> --
> View this message in context:
> http://octave.1599824.n4.nabble.com/Zero-crossing-tp4649020.html
> Sent from the Octave - General mailing list archive at Nabble.com.
> _______________________________________________
> Help-octave mailing list
> address@hidden
> https://mailman.cae.wisc.edu/listinfo/help-octave
Hi expikx,
You should pass the vector of the polynomial coefficients to the roots
function, not the evaluation of the polynomial at those points.
Hope this helps,
James Sherman
- Zero crossing, expikx, 2013/01/21
- Re: Zero crossing,
James Sherman Jr. <=