Matlab finite() function warnings

The latest version of Matlab deprecated the finite() function in favor of isfinite(). This is all fine and dandy in terms of improving the scripting language, but this change currently causes a crapalanche of warnings to be thrown as you use SPM. Usually along the lines of:

Warning: FINITE is obsolete and will be removed in future versions. Use ISFINITE instead.

Here is the line of code to turn those warnings off:

warning off MATLAB:FINITE:obsoleteFunction

Peace, serenity, and a clean terminal window to you my neuroimaging friend.

April 29, 2009 • Posted in: Miscellany, MRI, Statistics

2 Responses to “Matlab finite() function warnings”

  1. Soon - July 20th, 2010

    It has now evolved into a beast of an ERROR and not just a warning…
    No more peace…
    Would be really cool if you had some solution to that ;-)

  2. Michel Nieuwoudt - April 25th, 2015

    Thank you for posting this, you saved me sooooo much time and frustration! I had been trying to run a program I used three years ago and which worked just fine but for could not run it in the newer version of MATLAB and was going nuts. All I had to do was replace finite with isfinite and……….. voila!

    best wishes,
    Michel

Leave a Reply

You must be logged in to post a comment.