Why do the MIN and MAX functions return incorrect results when called from the FEVAL function in MATLAB 7.0 (R14)?
2 views (last 30 days)
Show older comments
If the MIN or MAX functions are called from the FEVAL function in MATLAB 7.0 (R14), such as:
[a, b] = feval(@min,c);
The values in 'a' will occasionally be a duplicate of those in 'c', instead of the minimum values in 'c'. This problem does not arise in MATLAB 6.5 (R13).
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
We have verified that there is a bug in MATLAB 7.0 (R14) in the way that the Just-In-Time (or JIT) accelerator evaluates the functions passed to the FEVAL function.
Currently, to work around this issue, disable the JIT accelerator temporarily by using the following code:
feature('accel','off')
[a, b] = feval(@min,c);
feature('accel','on')
0 Comments
More Answers (0)
See Also
Categories
Find more on Manage Products in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!