convert variables from string to integers
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Zeus
am 19 Mär. 2020
Beantwortet: Star Strider
am 20 Mär. 2020
hi ,So im new to matlab and im trying to convert string to integers .The question is 'Convert all the numbers in the variables Oxygen, CarbonDioxide, Temperature, Pressure, SolarRadiation and Humidity from strings to integers.'
is using str2num correct?
Oxygen=str2num("Oxygen")
%and so on for the other varaibles
is this syntax correct as it produces an output(below) ?or should it contain values from the input data?
Oxygen =
[]
0 Kommentare
Akzeptierte Antwort
Star Strider
am 20 Mär. 2020
The assignment probably wants you to turn them into unsigned integers.
I leave the rest to you.
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Type Conversion 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!