From: ahrid on
> ahrid <samsunsporthebest(a)msn.com> wrote in message
> <1662394615.93764.1281540065549.JavaMail.root(a)gallium.
> mathforum.org>...
> > srry forgot to mention that
> >
> > i get the following error:
> > ??? Subscript indices must either be real positive
> integers or logicals.
> >
> > Error in ==> newton at 3
> > while ((k< nmax)&&((abs(fun(x0)))> tol));
> >
> > Error in ==> opdracht2 at 9
> > v=newton('fv','dfv',v0,a,b,10^(-10),1000)
> >
> >
> > but when i try the function newton alone it will
> work for ex: newton('sin','cos',3,2,4,10^(-10),10) it
> give 3.14... as it should be
>
>
> It looks like some of your variables may be in
> be in the wrong class. Try converting them to doubles
> (str2double) if they aren't. The inputs at line 3 for
> newton are the problem. Put a break in the code on
> that line and run the program (click on the "-" next
> to the line number (3) on the left of the editor).
> Then look through your variables and see if you can
> find a problem. Its probably pretty simple, since
> MATLAB has a way of doing that...
> Maxx

First of al thnx for ur reply
But what do u mean by converting my variables to doubles? I don't understand it verry well

thnx in advance