Clear Filters
Clear Filters

extracting values from excel file

1 view (last 30 days)
Quan Seah
Quan Seah on 9 May 2018
Answered: Sharannya Ranjith on 11 May 2018
So I have read an excel file from a set data by using xlsread(), and now I want to get information from the excel file that is 9354x4. And I am trying to get all the data from row 1 to row 365 that is in the fourth column, I have tried using num1(365,4)*Note num1 is the variable that I used to read the excel file*, and it only gives me the data that belongs to row 365 column 4, but what I want is everything starts from row 1 to row 365 that is in column 4, please help.
  2 Comments
Pawel Jastrzebski
Pawel Jastrzebski on 9 May 2018
Edited: Pawel Jastrzebski on 9 May 2018
Try:
num1(1:365,4)
This will give you a range rather than a single value.

Sign in to comment.

Answers (1)

Sharannya Ranjith
Sharannya Ranjith on 11 May 2018
As suggested by Pawel, use a colon as a subscript. num1(1:365,4) should do the trick. Refer https://www.mathworks.com/help/matlab/ref/colon.html for more information on other indexing expressions.

Tags

Community Treasure Hunt

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

Start Hunting!