MATLAB: Changes in STRNCMP

compatibilitylist of changesmigrationrelease notesstrncmp

When did STRNCMP change its behaviour?
Matlab 2009a:
strncmp('asd', 'qwe', 0) % >> 0

Matlab 2011b:
strncmp('asd', 'qwe', 0) % >> 1

And in general: What is an efficient way to determine the release, when a function was changed?
[EDITED] 30-Sep-2011, 06:48 UTC
Matlab 2009a:
strncmp('a', 'a', 2) % >> 0
Matlab 2011b:
strncmp('a', 'a', 2) % >> 1
There are good arguments for the one and the other reply. But there are no good arguments for changing the behaviour of such elementary functions. It affects about 40.000 lines of my code, which directly and indirectly depends on the replied values.
I'm trying to migrate from 2009a to 2011b and this first problem stopped the tests after 3 minutes only. And there is no really convenient way to find a description when and why STRNCMP has changed. Even the bug-report is misleading:
STRNCMP and STRNCMPI return FALSE when comparing cell arrays and
considering 0 characters (i.e., with the third input set to zero).
No, it does not concern only cell arrays, but CHAR vectors also.

Best Answer

Hi Jan, This was a bug fixed in R2010b
Hope that helps, Wayne