Feeds
已回答
Which MATLAB function can remove the diagonal elements of a NxN matrix
remove_diagonal = @(t)reshape(t(~diag(ones(1,size(t, 1)))), size(t)-[1 0]); So : >> m = magic(5) m = ...
Which MATLAB function can remove the diagonal elements of a NxN matrix
remove_diagonal = @(t)reshape(t(~diag(ones(1,size(t, 1)))), size(t)-[1 0]); So : >> m = magic(5) m = ...
10 years 前 | 1