Help me with this
显示 更早的评论
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.
回答(1 个)
Star Strider
2020-11-7
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.
类别
在 帮助中心 和 File Exchange 中查找有关 Dates and Time 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!