[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Please Help
From: |
yoonus |
Subject: |
Please Help |
Date: |
Wed, 12 Sep 2007 15:39:07 +0530 |
This is a simple function in which I want to calculate the square root of
number ,which is u in this case. I got lot errors . please debug and help me
out.
This is the code
function x0 = mysolve(u)
options.abstol=1e-5;
f = @(x) x^2-u;
x0 = fsolve('f', 1);
return;
Errors
error: `f' undefined near line 1 column 37
error: evaluating assignment expression near line 1, column 35
error: called from `__fsolve_fcn__'
error: fsolve: evaluation of user-supplied function failed
error: evaluating assignment expression near line 6, column 5
error: called from `mysolve' in file `/octave_files/cafs/mysolve.m'
Thanks
Yoonus