Matlab has become nitpicky on data types, can it be turned off?
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Hong Ye
2012-8-3
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Install Products 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!