Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fun=@(x) ( atan(x) - 2 - (x+3).^3);
- x1 = fminsearch(fun, -100) %
- funABS = @(x) (abs( atan(x) - 2 - (x+3).^3));
- x0 = fminsearch(funABS, -100);
- start = fix(x0) - 10
- finish = fix(x0) + 10
- x = (start:0.01:finish)';
- yyy = fun(x)
- fun(x0)
- figure(1)
- hold('on');
- plot(x,yyy,'r*');
- plot(x0,fun(x0), 'b*')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement