I’m writing MATLAB code for
1. That opens the file and read the data.
2. The code must plot all hourly measurements of global irradiance for the whole year.
3. The code must calculate and return average air temperature of every month.
4. The code then must plot average monthly temperature values from point 3.
I managed to write code for read file
Clear
T= Readtable(‘filename.xlsx’)
For plot im trying to read the coloumn from excel file but I’m getting error. I wrote the following code
T1= Readtable(‘filename.xlsx’,’C1:C8761’)
I was stuck there for hours, couldn’t read column using readtable syntax.
I’m using MATLAB R2018
Please help me.

2 Comments

Rik
Rik on 9 Nov 2020
Same here: I made a capture so we can trivially restore any edit.
Why do you want to delete this question?
I wrote the code and excuted sucessfully. Since there are NO related answers to this question, i thought deleting this question would be appropriate. So, please delete this question.

Sign in to comment.

Answers (1)

MATLAB is case-sensitive.
Try this:
T1 = readtable('rfilename.xlsx' ,'C1:C8761')
Note that ‘Readtable’ does not exist, however readtable does (in R2013b and later releases).
Also, use single simple quotes. I corrected that here. For whatever reason, the original assignment showed up as:
T1= Readtable(‘filename.xlsx’,’C1:C8761’)
so the quotes may also have been (or would be) a problem.

Categories

Community Treasure Hunt

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

Start Hunting!