i cant load or read datasets
Show older comments
i cant load 'factoryReports.csv' dataset
4 Comments
KSSV
on 6 Jun 2023
Why you can't? What did you try? What error you are getting?
Manas
on 6 Jun 2023
Hello Amir,
You can use the readmatrix() function to import a .csv file into MATLAB. Keep the .m file and .csv file in same directory.
M = readmatrix('factoryReports.csv')
For More info you can refer to this following documentation Read matrix from file - MATLAB readmatrix (mathworks.com).
Amir Azadeh Ranjbar
on 6 Jun 2023
Answers (1)
Hi Amir,
There are a few potential reasons and troubleshooting steps you can try:
- Verify the file path: Double-check that you have provided the correct file path to the 'factoryReports.csv' dataset. Ensure that the file is located in the specified location and that the file name and extension are accurate.
- Check the current working directory: MATLAB looks for files in the current working directory by default. Make sure that the 'factoryReports.csv' file is either located in the current working directory or provide the full file path when loading the dataset.
- Check file permissions: Ensure that you have the necessary permissions to access and read the 'factoryReports.csv' file. If the file is read-only or restricted, you may encounter errors when attempting to load it.
- Check file name: Ensure that file name is correct and if still error persists then write whole address of the dataset.
I hope these steps will help you with your problem.
Thank you.
2 Comments
Lisjak
on 29 Dec 2023
There is no file on the computer?
Walter Roberson
on 30 Dec 2023
readtable() can read from URLs if you have a URL for the file.
Categories
Find more on Database Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!