Working with incompatible data types
Mostra commenti meno recenti
I'm currently working with legacy code (MATLABv2012) with the most current MATLAB version (2013a). In the old code base many calculations of the following form were performed:
c = a + b
where "a" was an uint64 and b was a double. In my MATLAB version this produces following error: Error using + Invalid type of input arguments (should be uint64)
In old MATLAB Versions this was not an error. Is it possible to use the old behavior?
Risposta accettata
Più risposte (2)
dpb
il 7 Set 2013
From
help uint64
"You can define your own methods for the uint64 class (as you can for any object) by placing the appropriately named method in an @uint64 directory within a directory on your path.
Type HELP DATATYPES for the names of the methods you can overload."
David
il 7 Set 2013
0 voti
1 Commento
dpb
il 7 Set 2013
If you mean a compatibility switch, afaik, no.
The way to make a method that mimics the previous is to write them it appears. I can find nothing regarding a change in behavior in the release notes and don't have other versions installed to test against for behavior different than 2012b.
Categorie
Scopri di più su Introduction to Installation and Licensing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!