Stuart’s MATLAB Videos

Watch and Learn

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

MATLAB Basics: Cell arrays for holding different data types 3

Posted by Doug Hull,

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.
 

3 CommentsOldest to Newest

Azarudeen replied on : 1 of 3
nice post mr.doug it was useful. I would like ask another question. how to insert a IP address format in an array. eg. 123.123.123.123
chandra replied on : 3 of 3
T={'authority' 'between' 'bonpow' 'closeness' 'evencen' 'hub' 'pagerank' 'subgraph'} F={'46' '61' '89' '112' '116' '79' '127' '157' '161'} for c = 1:length(T) for r = 1:length(F) tech=T{c} file_id=F{r}

Add A Comment

Your email address will not be published. Required fields are marked *

Preview: hide