'readtable' in 2023 version error (This issue did not occur in 2018)
5 次查看(过去 30 天)
显示 更早的评论
Ele_intensity = readtable('electricity_consumption_carbon_intensity.csv');
Ele_intensity= Ele_intensity{1105:1152,2}; %Import data from row 1105 to 1152 ,column 2
Gas_intensity = readtable('gas_consumption_carbon_intensity.csv');
Gas_intensity= Gas_intensity{481:528,2}; %Import data from row 481 to 528 ,column 2
Ele_Quantity = readtable('electricity_consumption_quantity_price.csv');
Ele_Quantity= Ele_Quantity{1105:1152,2}; %Import data from row 1105 to 1152 ,column 2
Gas_Quantity = readtable('gas_consumption_quantity_price.csv');
Gas_Quantity= Gas_Quantity{481:528,2}; %Import data from row 481 to 528 ,column 2
The last four rows of code successfully import data from the csv document in both 2023b and 2018b,but the first four rows of code only import the right data in R2018b and in 2023b the array only has many 3. So I was wondering what was wrong with that,and is that code incompatible in two versions?
2 个评论
Dyuman Joshi
2024-3-23
How readtable() handles titles, headers etc might have changed from R2018b to R2023b.
You should check and compare the respective documentations to see what changes have been made.
采纳的回答
Star Strider
2024-3-23
I do not understand ‘2023b the array only has many 3’, however I believe that the shortened table display in the last few releases is simply a display issue. The entire file is being imported correctly.
6 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Standard File Formats 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!