File Exchange Pick of the Week

Our best user submissions

MATLAB Basics: Cell arrays for holding different data types

Sometimes in MATLAB you are going to want to store different data types together in one construct rather than try and keep track of different variables. Structures work for this, but sometimes it is nice to be able to refer to the data in row and column notation rather than by field name. That is where cell arrays work best.

This video will show the construction of a cell array that contains four scalars and then a string is added. Finally, a cell array is put inside of the original cell array. This is possible, because cell arrays can hold any data type.

  • print


댓글을 남기려면 링크 를 클릭하여 MathWorks 계정에 로그인하거나 계정을 새로 만드십시오.