I have some code that produces a different result when run in R2018b than it did in R2016b, and I've identified that num2str (which is used to create a text file to exchange data with an external tool) is giving different output for some values. For example, in R2016b:
>> num2str(1.51535)ans =1.5154
but in R2018b:
>> num2str(1.51535)ans = '1.5153'
I can work around this difference, but I can't find anything about this change in the MATLAB release notes, so before I commit any code changes I want to be sure that this is actually a change in MATLAB's default behaviour and not some setting I've overlooked that might be different between my R2016b and R2018b installations. Is this the case?
Best Answer