Showing posts with label data type. Show all posts
Showing posts with label data type. Show all posts

Thursday, 5 December 2013

What are 'cells' in Matlab?

Cells = Arrays that can contain data of varying types and sizes.

More details at:

http://www.mathworks.com/help/matlab/cell-arrays.html

How to create 'structures' in Matlab?

Example: Following command creates a structure with various fields with different data types.

struct('ifData', zeros(1, 1000), 'fSamp', 10e6, 'fif',0.42e6, 'noOfBits',16,'complexOrReal','complex','prn',10)



>> struct('ifData', zeros(1, 1000), 'fSamp', 10e6, 'fif',0.42e6, 'noOfBits',16,'complexOrReal','complex','prn',10)

ans =
           ifData: [1x1000 double]
            fSamp: 10000000
              fif: 420000
         noOfBits: 16
    complexOrReal: 'complex'
              prn: 10