MATLAB: Analyze Rainfall Data - Standardized Precipitation Index (SPI)

Опубликовано: 29 Июнь 2026
на канале: Engineering with Dr. Kelsey Joy
1,670
22

In this video, I go through how to analyze rainfall data to determine the standardized precipitation index (SPI). I discuss how to go about analyzing data to understand it. I talk about the importance of working with experts on the context of the data throughout the process, when feasible. I also demonstrate how to validate your results.

Here is a link to the data used and program developed in this video:
https://www.mathworks.com/matlabcentr...


In a previous video I go through how to change a large text file (.txt) that imports into MATLAB as strings in cells to accessible (separated/organized) set of data consisting of cell arrays with strings and numbers. I received a set of data from a subscriber. In this video I go through the process of familiarizing myself with the data set and figuring out how to make it accessible so I could analyze it for the given problem.
Watch previous:    • MATLAB: Importing/Cleaning .txt file (stri...  

Check this playlist of videos about techniques to import and analyze Excel data in MATLAB:    • Everything MATLAB + Excel tutorial and exa...  

I also have a MATLAB tutorial playlist if you are looking for help with anything from the basics to more complex ideas:
   • How to Create Programs in MATLAB (tutorial)  

#MATLAB #learntocode #engineeringstudent #engineeringstudents #engineering #engineer #coding #code #programming #program #cleandata #analyzedata


Chapters:
00:00 Introduction
00:08 Discussing previous video (import and clean data)
00:26 Rainfall data analysis approaches
01:19 Starting to analyze the data (where in code)
01:50 Standardized Precipitation Index (SPI) - probability of event
02:54 Calculating probability inside for loop
03:48 Handling bad data (NaN)
04:48 Adding descriptive statistics (mean, median, min, max)
05:02 Handling bad data (too large of values to be realistic)
06:45 Reviewing data to ensure no bad data
07:18 Handling bad data (probability of 0 or 1 unrealistic, so remove)
08:40 Bar graph (visualize data analysis)
09:35 Use real world context to validate results
12:30 Thank you for watching!