Importing data from xls file
Importing data from xls file
(OP)
Hello
I am indexing information from a xls file, most of it by columns. How can I place conditions to the importing data?
i.e. Indexing data from Col1 that is greater than 0
Col 1
3
4
5
0
9
variablex= data (:,1) IF >0 ?????????????
thanks for your help
I am indexing information from a xls file, most of it by columns. How can I place conditions to the importing data?
i.e. Indexing data from Col1 that is greater than 0
Col 1
3
4
5
0
9
variablex= data (:,1) IF >0 ?????????????
thanks for your help





RE: Importing data from xls file
%this returns the indeces of all nonzero elements of A to elements of X.
X=find(A)
%this makes a new matrix (column vector) that is as long as X but with the elements in A, which have indeces given by the elements of X
B(1:size(X))=A(X)
%Just make a function that imports the variable, runs it through this program, and then spits it into the workspace or a .mat file or whatever.
Custodes
RE: Importing data from xls file
RE: Importing data from xls file
A=A(A~=0);
No need to use find().
- Steve