Re: fzero and splines in matlab
- From: kniesjennifer@xxxxxxxxxxx
- Date: 30 Apr 2007 10:57:57 -0700
On Apr 30, 1:24 pm, "Steven Lord" <s...@xxxxxxxxxxxxx> wrote:
<kniesjenni...@xxxxxxxxxxx> wrote in message
news:1177948733.119018.277770@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi all,
I have a dataset that I fit a curve to with the csaps function in
matlab. I would like to find the roots of this curve.
Here is my code and error message:
fun = inline('csaps(x,y,0.2)','x','y');
xroot = fzero(fun,0,[]);
??? Error using ==> fzero
FZERO cannot continue because user supplied inline object ==> fun
failed with the error below.
Error using ==> inline/feval
Not enough inputs to inline function.
'x' and 'y' are respectively temperature and growth rate measures.
These variables are specified earlier in the code.
I would appreciate your help very much,
How many input arguments does FZERO expect your objective function to have?
http://www.mathworks.com/access/helpdesk/help/techdoc/index.html?/acc...
How many input arguments does the inline object you're passing to FZERO
have?
You need to make the answers to those two questions agree by changing the
number of inputs the thing you're passing to FZERO has. You'll also need to
consider what your function should return back to FZERO and what it's
actually returning now.
--
Steve Lord
s...@xxxxxxxxxxxxx
Hi Steve,
I see that fzero finds the root of function of 1 variable and I think
I am using 2 variables to define my inline object fun. However, in
order to fit the spline to my data using csaps I do not 2 variables (x
and y). If you have an idea for how to make my function only depend on
1 variable, I would greatly appreciate it. I have tried a number of
different ways of dealing with this I can not figure it out.
Best,
Jen
.
- References:
- fzero and splines in matlab
- From: kniesjennifer
- Re: fzero and splines in matlab
- From: Steven Lord
- fzero and splines in matlab
- Prev by Date: Re: test of normality with considering frequencies
- Next by Date: Re: Function '*' not defined for variables of class 'int16'.
- Previous by thread: Re: fzero and splines in matlab
- Next by thread: Windows notepad & fprintf
- Index(es):
Relevant Pages
|