Thursday, November 07, 2013

Matlab Tricks

MATLAB tricks.

1. If you have two cell arrays, you can concat them together using concat(c1,c2);
2. To delete element from Vector (or Double matrix), Use:
a=[1,2,3,4,5];
b = a(a~=3);

Output: [1,2,4,5]
Ref: http://www.mathworks.com/matlabcentral/answers/48938

3. To remove space between string, 
regexprep(stringvalue,'[^\w'']','')



No comments: