Search this site
Embedded Files
Matlab by Examples
  • Tutorial
  • File operations
    • File commands
    • Files: read & write
      • fprintf
  • Matrix
    • cell array
      • Convert cell array
      • Single value to multiple fields
      • str2num
    • Check for subset
    • Create matrix
    • Index pairs permutations
    • Matrix to vector
    • Number range
    • Sort
      • Multiple columns
      • Reverse order of elements
    • triu elements
  • Multiprocessing
  • Plot
    • Axes
    • Bar plot
      • Barplot colors
      • Barplot percentage
    • Clustergram
      • to figure
    • Colors
      • Sample colors
    • Histogram
      • Histogram colors
      • Horizontal histogram
    • Remove top and right axes
    • Save as png
    • Subplot
    • Subtitle
  • Strings
    • Add prefix
    • Frequencies
    • Join
    • remove
  • Structure
  • System
    • Command line
      • Error
  • Time
Matlab by Examples

cell array

Data structures (Matrix,...)

Append single element to cell array

A = {'a1','a2'};

A{end+1} = 'a3'

  'a1'  'a2'  'a3'

Append multiple elements to cell array (combine / concatenate cell arrays horizontally)

A = {'a1','a2'};

B = {'b1','b2'};

A = [ A, B ]

  'a1'  'a2'  'b1'  'b2'

→ Cell arrays: edit text in cell fields 

        replace, merge,...

www.nlpca.org

Google Sites
Report abuse
Page details
Page updated
Google Sites
Report abuse