[go: up one dir, main page]

Menu

[73c35b]: / init / wnz.m  Maximize  Restore  History

Download this file

12 lines (11 with data), 366 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
% wnz.m: finds non-zero supports in columns of a matrix
% GUISDAP v.1.60 96-05-27 Copyright Asko Huuskonen and Markku Lehtinen
%
% The interval between upper and lower boundaries of the non-zero
% elements of a column 'ch' in a matrix 'A'
% function resi=wnz(A,ch)
function resi=wnz(A,ch)
%
B=A(:,ch);
ivector=find(B~=0);
resi=(min(ivector):max(ivector))';