05 August, 2008

idx =(a>0) % returns 1 if true, 0 otherwise

A=magic(4) % create a matrix
[r,c,v]=find(A>10) %get indices + vector of elements satisfying the conditions

N=(A>3) % produce matrix with same dimensions as A, with 1 and zeros according to condition

pretty(expression)
%and
latex(expression)
% as the names suggest

No comments: