Matlab functions you should know                                                                        Sanjay Manohar

 

Level 1 – Beginner

·        help                  

·        plot

·        scatter               scatter plot (x,y)

·        hist                     histogram

·        hold                   keep previous fig

·        subplot               (Nvert, Nhorz, i)

·        title

·        xlabel, ylabel

·        xlim, ylim

·        legend               ({‘line1’,’line2’})

·        clf

·        length

·        size

·        cat                     (dimension, v1,v2)

·        mean

·        median

·        sum

·        nan, isnan

·        nanmean, nanstd

·        ones, zeros

·        load

·        save

·        cd, ls, dir

·        edit

·        clear

Syntax:

·        Matrices                      [ 1,2 ; 3,4]

·        Indexing                       X(:,:,:)

·        Arithmetic                    + - * / ^

·        Comparison                 <  >  ==  ~=

·        Conditionals                 if … else

·        For loop                       for … end

·        While loop                    while … end

Level 2

·        find

·        which

·        exp, log, sqrt

·        sin, cos, atan2

·        floor

·        (nan)max, min

·        inf

·        pi

·        ttest

·        regress, ols

·        corr

·        cov

·        repmat

·        squeeze

·        diff

·        rand, randperm, perms

·        export_fig

·        imagesc

·        colormap, colorbar

·        caxis

·        bar, stem, boxplot

Syntax:

·        Transposition               X’

·        And, Or, Not                &,  |,  ~

·        Element-wise              .* ./

·        Structures                    struct.field

·        Strings                         ‘text’

Level 3

·        unique, union

·        sort

·        any, all

·        prod

·        permute

·        reshape

·        zscore

·        eye

·        fliplr

·        strcmp, regexp

·        normpdf, normcdf

·        ecdf

·        quantile

·        qqplot

·        rose

·        randn

·        linspace

·        smooth

·        interp

·        cumsum

·        quadl

·        signrank, ranksum

·        sprintf

·        addpath

·        pathtool

·        cd, pwd

·        dbstop if error

·        dbstep, dbcont, dbquit

·        drawnow

·        pause

·        abs, angle

·        real, imag

·        mod

·        norm

·        numel

·        sound

Syntax

·        Functions                     function …

·        Cell arrays                   { 1,2,3 }

·        Complex values          1j

Level 4

·        ndims

·        arrayfun

·        cellfun

·        num2cell

·        bsxfun

·        fminsearch

·        ksdensity, interpn

·        conv, conv2

·        hist3

·        contour

·        meshgrid

·        gridfit

·        quiver

·        logspace

·        surf

·        axis vis3d

·        lighting, camlight

·        anovan

·        moment

·        xlsread                         excel import

·        load_nii, save_nii

·        tcdf, chi2cdf

·        erf, erfinv

·        chi2cdf

·        fft, fftn, hilbert

·        pwelch

·        kstest

·        eig

·        svd

·        pdist

·        pinv ( \ )

·        glmfit, linhyptest

·        x2fx

·        mle

·        kron

·        triu

·        qr

·        circshift

·        fieldnames, rmfield, isfield

·        global

·        error, warning, lasterror

·        xor

·        findpeaks

Syntax

·        Function handles         @eq

·        Cell expansion          X{:}

·        Indirect field      struct.(fieldname)

·        try, catch

Level 5 – Advanced

·        ind2sub, sub2ind

·        ind2vec, ind2rgb

·        accumarray

·        cell2struct

·        bootci

·        bootstrp

·        nlmefit              

·        nlinfit

·        mle, mlecov

·        nargin, nargout

·        hampel

·        butter, filter

·        decimate          

·        tiedrank            

·        parsepvpairs    

·        exist

·        isosurface

·        fill                      

·        mpower

·        linkage              

·        cmdscale

·        optimalleaforder

·        symrcm, symamd

·        evalin                

·        set, gca, gcf     

·        ginput               

·        rng                    

·        class

·        matlabpool       

·        spmd, parfor

·        mex                  

·        ga                     

·        patternsearch   

·        loadlib, callib

·        xcorr2

·        persistent

·        VideoWriter

Syntax

·        multi capture               [x{:}]=func()

·        array expansion          [x{:}]=deal(x)