Tip: Participate in Machine Learning Course Certification Quiz to test your knowledge.
It is now a fact that data is a key component of all the systems that surround us today. By performing data operations, we can obtain meaningful information. Data remains an essential factor in obtaining meaningful information. Importing data and exporting data are also important steps that we need to complete operations on data and obtain information from data.
The learning objectives of this chapter are as follows:
- To get information about importing data interactively into MATLAB.
- To get information about importing data programmatically into MATLAB.
- To get information about exporting data programmatically from MATLAB.
- How to organize data in MATLAB.
Importing Data Interactively into MATLAB
There are several ways to import data in MATLAB. We can import data both programmatically and interactively. Importing data interactively includes a system clipboard. Following ways, we can use to import data interactively.
1. Click on the import data tab in the variable section of the Home tab.
The import data tab allows loading various data files of different formats. After clicking on the import data tab, browse the file that you want to import. After selecting the file, the file would be opened in the MATLAB environment. Click on the import selection tab and close the current window. I am using diabetes file which you can download from the Resources section at the bottom of this page.
You can check, the file is imported under the workspace window.
2. By choosing a file from the directory.
Double-click on any format of the file that you want to import and just follow the same procedure that we have followed for the above method.
3. uiimport command will open a dialog box in the MATLAB environment.uiimport command will open a dialog box in the MATLAB environment. Choose the file option and browse the appropriate file. After selecting the file, just follow the same steps that we have followed for the first method.
We've seen the following things in this lesson:
- How do we import data interactively into MATLAB?
We're going to see in the next lesson:
- How do we import data programmatically into MATLAB?