필터 지우기
필터 지우기

Importing a text file and then using "counting" approach

조회 수: 1 (최근 30일)
KayLynn
KayLynn 2014년 3월 10일
댓글: Sean de Wolski 2014년 3월 10일
I am trying to import a text file into matlab. I tried using the following: A=xlsread ('temperature. txt')
Once I am able to import the data, I want to observe several different time intervals using a for loop (is this a counting approach) to record the frequency of the readings. I am given 7 different time intervals:
0 < t< 30
30<t<80
80<t<130
130<t<150
150<t<180
180<t<200
t>200
I am unsure how to put a less than or equal to sign in correct format ( basically I am trying to say that t is greater than or equal to zero but less than or equal to 30).
Do i have to write a for loop for each time point or is there a way to include all time intervale in one for loop to determine the frequency.

채택된 답변

Sean de Wolski
Sean de Wolski 2014년 3월 10일
편집: Sean de Wolski 2014년 3월 10일
How about using histc() or hist()? These will count for you :)
  댓글 수: 2
KayLynn
KayLynn 2014년 3월 10일
that may work but i still am unable to get my text file imported into matlab....any suggestions for that
Sean de Wolski
Sean de Wolski 2014년 3월 10일
Use the import tool. From the Home Tab select the fourth button in "Import Data". Then make any adjustment you need to inside of this tool.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by