My code is Unable to read my table that is in workspace. Any Help will be much appreciated
29 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
John Carroll
le 14 Fév 2021
Commenté : Cris LaPierre
le 15 Fév 2021
Feb 14, 2021 2:50:31 PM com.jidesoft.plaf.aqua.AquaPreferences loadGlobalPreferences
WARNING: AquaPreferences failed to load Mac OS X global system preferences - parseInt: unsupported byte count:16
>> Lab1
Error using readtable (line 245)
Unable to find or open 'WH'. Check the path and filename or file permissions.
Error in Lab1 (line 6)
X = readtable('WH','Range','A2:A39'); %importing X values into vector
CODE :
%Code for Waves Lab 1 Data
X = readtable('WH','Range','A2:A39'); %importing X values into vector
X1 = table2array(X);
Y0 = readtable('WH','Range','B2:B39'); %importing Y original values into vector
Y01 = table2array(Y0);
YW = readtable('WH','Range','C2:C39'); %importing Y winter values into vector
YW1 = table2array(YW);
YS = readtable('WH','Range','D2:D39'); %importing Y summer values into vector
YS1 = table2array(YS);
0 commentaires
Réponse acceptée
Cris LaPierre
le 15 Fév 2021
Your file appears to be missing an extension. What type of file is WH? Try adding that to your readtable command. For example, if it were an Excel spreadsheet, I'd do the following.
X = readtable('WH.xlsx','Range','A2:A39'); %importing X values into vector
If that still doesn't work, please attach your file to your post using the paperclip icon.
2 commentaires
Cris LaPierre
le 15 Fév 2021
When I try to download then open the file, the actual name appears to be "_WH.xlsx".
Try using the actual file name, or rename the file to "WH.xlsx",
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Spreadsheets dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!