am trying to cluster my data but matlabs keeps on indicating that Unrecognized table variable name 'sub_metering_1'.
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
>> 'C:\Users\Vlad\Downloads\household_power_consumption_2007';
>> data = readtable(file_path, 'Delimiter', ';');
X = data{:, {'sub_metering_1', 'sub_metering_2', 'sub_metering_3'}};
Error using {}
Unrecognized table variable name 'sub_metering_1'.
3 Kommentare
Antworten (1)
Dyuman Joshi
am 7 Okt. 2023
Variable names in MATLAB, independently or of a data type, are case sensitive. You need to use the variable name with the proper case as it is defined.
For your case, that would be -
X = data{:, {'Sub_metering_1', 'Sub_metering_2', 'Sub_metering_3'}};
0 Kommentare
Siehe auch
Kategorien
Mehr zu Tables finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!