Matlab has become nitpicky on data types, can it be turned off?

조회 수: 1 (최근 30일)
Jee
Jee 2012년 7월 26일
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?

답변 (1개)

Hong Ye
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.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by