Importing data from outside matlab directory?

6 vues (au cours des 30 derniers jours)
Allen Porter
Allen Porter le 29 Fév 2024
Commenté : Rafa le 29 Fév 2024
My students use matlab on chromebooks, how can the import a .txt file from their downloads folder to their matlab directory?
  1 commentaire
Rafa
Rafa le 29 Fév 2024
To import a .txt file (or any file/folder) in your MATLAB Online session that is currently in your downloads folder on your local computer, you would need to upload it first to MATLAB Drive or OneDrive. MATLAB Online does not have direct access to your local file system, including your downloads folder, so the file must be in MATLAB Drive or OneDrive to be accessible from MATLAB Online.
These are useful links:

Connectez-vous pour commenter.

Réponses (1)

Star Strider
Star Strider le 29 Fév 2024
Probably the easiest way is to use the fullfile function to generate the complete path to the file. To access other files in the same directory, only the filename then needs to be provided.
To transfer it to a directory on the MATLAB path, use the copyfile function.

Catégories

En savoir plus sur File Operations dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by