Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Why replace isequalwithequalnans with isequaln?

Asked by David on 11 Dec 2012

Regarding the switch in 2012a [1]:

 Other Functionality Being Removed or Changed
 Functionality: isequalwithequalnans
 What Happens When You Use This Functionality: Still Runs
 Use This Instead: isequaln
 Compatibility Considerations: Replace all instances of isequalwithequalnans with isequaln.

Comments [2,3] have suggested that the reason for the switch is just to shorten the name of the function. Is this the true change, or is there any other benefit (performance) to consider in the new function?

Thanks for your comments.

[1] http://www.mathworks.com/help/matlab/release-notes.html

[2] http://www.mathworks.com/matlabcentral/answers/42758-comparing-matices-that-contain-numbers-and-nans#body_comment_87899

[3] http://www.mathworks.com/matlabcentral/answers/49623-being-equal-two-matrics-contaning-nans-and-numbers-smaller-than-1#body_comment_102719

0 Comments

David

Products

1 Answer

Answer by Jan Simon on 12 Dec 2012
Accepted answer

As long as isequalwithequalnans is still support, I cannot see a problem.

I assume the new function name isequaln was chosen, because the old one is the most ugly function name I've ever seen.

3 Comments

Steve Eddins on 12 Dec 2012

Jan's answer is basically correct.

David on 12 Dec 2012

Thanks, Jan & Steve. Is there any forecast on when or whether isequalwithequalnans will be removed?

This will help us plan when setting system requirements for our production software.

Jan Simon on 12 Dec 2012

@David: There have been and will be much more substantial changes than just the name of this function.

In my startup.m file a folder depending on the running Matlab version is included, which stores functions for forward and backward compatibility. On demand you can add a function in such a folder for patches:

function Out = isequalwithequalnans(varargin)
Out = isequaln(varargin{:});
Jan Simon

Contact us