Hi,
In my code, I have a function wich receive a lambda function f.
inside this function, I have a variable called newPoint
I stop with a breakpoint in the running, the value of newPoint is 1.0434
and if I write in the console f(newPoint), I get 0, but if I write f(1.0434) i get -5.2815e-05.
so in my function, I can not evaluate precisely f(newPoint)
(My function f is f = @(x) 2 - x^3 -sin(x))
I will very gratefull if you can help me.
8 Comments
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256358
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256358
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256453
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256453
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256613
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256613
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256718
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256718
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256833
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1256833
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1257373
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1257373
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1257383
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1257383
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1257503
Direct link to this comment
https://au.mathworks.com/matlabcentral/answers/713888-f-x-is-different-of-f-value-of-x#comment_1257503
Sign in to comment.