Matlab has become nitpicky on data types, can it be turned off?
2 views (last 30 days)
Show older comments
At work we recently switched from Matlab R2008 to Matlab R2012. Suddenly many functions have become nitpicky with datatypes:
For example:
- A*B is no longer allowed if A is a vector of type integer and B is a vector of type double.
- DATENUM only wants doubles as input, although dates are naturally given as integers
I don't like this very much because:
- older programs don't work any more
- having to think about data types distracts from making the actual algorithm. (The reason I like Matlab is that I can quickly convert new ideas to a working program, and don't have to think about all the administrative stuff like variable declaration that you have to do in normal programming languages. If the idea works, it is reprogrammed in C. So I don't care so much if my Matlab program is not optimized for memory use or speed)
My questions:
- At what version became Matlab so nitpicky?
- Is there a way to turn this nitpickiness off?
0 Comments
Answers (1)
Hong Ye
on 3 Aug 2012
Jee, can you give more details on the code that does not work with R2012 MATLAB , for example, how A and B are defined in your application? I checked that in R2008a MATLAB, it is only allowed to multiply integer array with another integer array of the same class or a scalar double. this is same for both R2008a and R2012a.
0 Comments
See Also
Categories
Find more on Logical in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!