Sample MATLAB Code: Applied Database (Creating Excel File, Importing Excel File, Manipulating Data)

Опубликовано: 09 Октябрь 2024
на канале: Engineering with Dr. Kelsey Joy
5,195
64

Steps to create a MATLAB program to import an Excel file into MATLAB and then use different functions in MATLAB to filter through my data (e.g., unique function, strcmpi function). Throughout this video I review cell arrays, data types, manipulating arrays, and string functions in MATLAB. For this example I used some data relevant for Fantasy Football.

I demonstrate the process of starting with preparing data, importing the data in, filtering the data, and slowly adding more features after making sure each step works. I also demonstrate some troubleshooting through this process.
The major steps I took are as follows:
1. started with an Excel file
2. use readcell function to import Excel file data in MATLAB (data type: cell array)
3. add feature/input to all user to select a requirement to filter the data
4. filter the data based on user input

Here is the code that I wrote in the video along with additional notes, as well as the Excel file: https://www.mathworks.com/matlabcentr...
NOTE: Be sure to save both files in the same folder to run this code.

Here's another video that covers manipulating Excel files in MATLAB and plotting data:    • MATLAB: Import, Clean, Sort, and Plot...  

How to Create Programs in MATLAB tutorial playlist:    • How to Create Programs in MATLAB (tut...  

#MATLAB #Excel #learntocode #importdata #engineeringstudent #engineeringstudents #engineering #engineer #coding #code #programming #program

Chapters:
00:00 Generating/Organizing an Excel file (.xls or .xlsx)
01:07 Importing an Excel file into MATLAB (cell array in .m script file)
01:45 Manipulating data from the Excel file in MATLAB
10:49 Summarizing the program