The main function takes no parameters and prompts the user to select the type of csv file operation to be performed.
ImportCSV - Prompts the user to select a csv file in current folder. It imports its header and data information and saves it in a .mat file
ExportCSV - Prompts the user to select a .mat file in current folder. It uses the header and data inputs to create a csv file in your current folder
theblueeyeswhitedragon (2020). CSV with Headers Import/Export (https://www.mathworks.com/matlabcentral/fileexchange/68459-csv-with-headers-import-export), MATLAB Central File Exchange. Retrieved .
Export .mat to .csv.but the .csv's dont have data
"Prompts the user to select a csv file in current workspace"
"Prompts the user to select a .mat file in current workspace"
These statements do not make sense. The MATLAB workspace does not store any files. The MATLAB workspace can contain MATLAB variables, which are arrays (e.g. numeric arrays, character arrays, cell arrays, struct arrays, etc), or handles to various objects (e.g. graphics objects), and several other kinds of object. These concepts are explained in the MATLAB documentation:
What this submission actually does is import file data from the Current Folder. The Current Folder is simply a folder which has priority on the MATLAB Search Path:
This submission imports data from files in the current folder and saves it again with a different file format.
If the author had returned the second output from UIGETFILE then it would not be restricted to only files in the the Current Folder.
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!