reading values

조회 수: 6 (최근 30일)
kash
kash 2012년 1월 25일
I have some data ,i tried using xlsread ,but final column is not dsiplaying
A=
12 36 45 858 8 1 >50
10 2 1 21 20 0 <=50
like these i have 30000 rows and 6 columns,now i want to read all the column and store the last column in separate variable,please help
  댓글 수: 1
Image Analyst
Image Analyst 2012년 1월 25일
What is that? That is not MATLAB code.

댓글을 달려면 로그인하십시오.

답변 (2개)

Image Analyst
Image Analyst 2012년 1월 25일
How about this:
separateVariable = array2D(:,end);
  댓글 수: 4
kash
kash 2012년 1월 25일
column1 colmun2 column3 column4 column 5 column6 column7
10 2 1 21 20 0 <50
these i have stored as dataset.xls
now i want to read all datas and display
next i want last column to be stored in separate variabe ,
then in that last column i want to count how values are there
which is >50,<=50
Image Analyst
Image Analyst 2012년 1월 25일
Do what I said then. The to get the sum of the number of elements where the value <= 50:
summedUp = sum(lastColumn<=50);

댓글을 달려면 로그인하십시오.


Walter Roberson
Walter Roberson 2012년 1월 25일
How did you do the xlsread() ? That final column is going to be discarded (or 0 or NaN) in the (default) numeric output, available only in the second (text) output or third (raw) output.

카테고리

Help CenterFile Exchange에서 Low-Level File I/O에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by