Why is it that Matlab has so many data types?
Show older comments
list many data types for Matlab. Why is it that they developed so many data types in Matlab?
Accepted Answer
More Answers (1)
Bjorn Gustavsson
on 30 Nov 2020
0 votes
Partial "answer":
In the beginning there were the double (32-bit?) and the char, and everything was peaceful, then they ate of the forbidden fruit and saw that there were special use-cases where new types would be beneficial, large images (gray or colour) could be much easier handled in a smaller bit-format, so they started to multiply, the int8, then the int16 and all their signed and unsingned siblings, and suddendly you could no longer index arrays with flints - but you got to use multidimensional arrays, then there was a struct and cell and they were ever so handy, then there was a function-handle that came walking by and made space...
(others could join in...)
Every data-type have its useful use-cases where they are ever so handy, when working with large images that have 8-bit intensities it can be handy not having to convert them to 32(64?!)-bit double data, just to not waste space. Structs and cell-arrays are very convenient types to bundle data of various types that should "go together" (for one reason or other). Time is a notoriously messy data-type to handle well and generally (daylight-savings-time, midnight and elapsed times and time-zones and on and on...) so a proper set of functions for handling all of that.
1 Comment
alpedhuez
on 30 Nov 2020
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!