Importing Excel Data into MATLAB
Method
Matlab provides the functionality to import data from Excel files. First, click on ‘Import Data’ from the Home menu.
Select the Excel file that contains the data you want to import.
Then, you can select which data to import, which is automatically selected initially. Confirm and click ‘Import Selected’.
From ‘Import Selected’, click on ‘Import Data’.
Then, the data from the Excel file is input into a variable with the same name as the Excel file. However, since this is not an array but a table, you need to use table2array()
to convert it into an array to use it as desired. The example code and result when the title of the imported Excel file is X are as follows.
X1=table2array(X)