MathWorks Interview Question

---Matlab -Matlab code to clear workspace variable? -There are 100 variables in the workspace. How to delete all variables except 2? -Matlab code for matrix concatnation? -What does '@' symbol mean in Matlab and where do we use it? -Difference between cell array and structure in matlab?

Interview Answer

Anonymous

Apr 27, 2015

clearvars -except matrices concatenation: cat, horzcat, vertcat... @means function handle, it is used to define anonymous functions. and call the function out of the current scope. Structure arrays contain data in fields that you access by name. Cell arrays contain data in cells that you access by numeric indexing. Common applications of cell arrays include storing lists of text strings and storing heterogeneous data from spreadsheets.

1