top of page
  • Writer's pictureAdisorn O.

Getting to know MATLAB's Cell

Updated: Aug 29

Sometimes we want to store various data types into a single array. Thinking of a container that can store various things in separate cells, we can use the curly bracket { } to work as cells. This allows us to organize various types of data into a variable name.




To refer to an item inside this multi-block cell, we use a curly bracket with the referenced number of cells we want to take out. Let us see some examples,


When do we use cells? From my experience, if you work with combinatorial optimization, especially in cluster optimization, the cell is useful when we need cells to contain the cluster of design variables. In many cases, the number of variables in each cell is not equal where the normal array fails to serve as a container to the variables.






12 views

Comments


bottom of page