2022 How to Load, Clean, and Visualize Raw CSV Data in MATLAB | MATLAB Tutorial

Phil Parisi
Phil Parisi
6.8 هزار بار بازدید - 2 سال پیش - How to Import, Clean, and
How to Import, Clean, and Visualize Raw .csv Data in MATLAB! Load the data, filter and clean arrays, and create plots and graphs of the raw data. Awesome beginner project!

FOLLOW ALONG! Grab the .csv file here: https://philparisi.weebly.com/code.html
1. Import or Load Raw Data into MATLAB
2. Convert Raw Data to Proper Datatypes
3. Perform String Manipulation on Strain Data
4. Create Visualizations, Optimize Visuals

LEARN MATLAB
55-video MATLAB programming certification! https://trainings.internshala.com/mat...
2hr Complete Beginner Basics in MATLAB: Complete MATLAB Beginner Basics Cours...
MATLAB Formula Cheat Sheet: https://philparisi.weebly.com/code.html

CHAPTERS
0:00 Import / Load Data
2:33 Convert Tables to Arrays
5:28 String Manipulation
8:40 Cleaned Data!
9:30 Data Visualizations
9:55 3D Plot plot3()
10:43 Scatter Plot scatter()
15:09 Final Result


MATLAB BASICS
Linear Algebra & Matrices How to do Matrix Math in MATLAB | MAT...
The Index How to Index through a Matrix in MATL...
What Are Functions? How to Use Functions in MATLAB | MATL...
Anonymous Functions How to Write Equations (Anonymous Fun...
Figures & Plots How to Make a Plot and Graph in MATLA...
If Statements How to Write IF, ELSE Conditional Sta...
For Loops How to Make a For Loop in MATLAB | MA...
While Loops How to Make a While Loop in MATLAB | ...
Make Your Own Functions How to Use Functions in MATLAB | MATL...

ADVANCED MATLAB
Indefinite and Finite Integrals Definite and Indefinite Integrals in ...
Fourier Transform Fourier Transforms FFT in MATLAB | MA...
Analytical vs. Numerical Solutions Analytical vs Numerical Solutions Exp...
Dice Roll Simulation Dice Roll Simulation in MATLAB | MATL...
Convolution How to Perform a Convolution in MATLA...
Make a .MP4 From a Plot 2022 How to Make MP4 Video File from ...

--------------------------------FREE CODE FROM VIDEO---------------------------------------------------------
% Plotting Sensor Data
% .csv file here: https://philparisi.weebly.com/code.html

% Read in Sensor Data
clc, clearvars, close all, format compact

% Load in Data
data = readtable("sensordata.csv")


%% Data Filtering/Processing (MUST BE RUN AFTER SECTION 1)
clc, clearvars -except data, format compact, close all

% Convert x, y, and strain from Table to Array
strain(:,1) = table2array(data(:,1));
strain(:,2) = table2array(data(:,2));
s3 = table2array(data(:,3));

% Third Column is tricky
% cell to string... or char?
s3 = string(s3);

% Get rid of values right of !
s3 = split(s3,"!");
% Convert to double (numeric)
s3 = double(s3(:,1))

strain(:,3) = s3


% Data Visualizations
% We have x, y, and 'z' ...plot3() or surf()?

% 3D Plot!
figure(1)
plot3(strain(:,1), strain(:,2), strain(:,3), ...
   '.b', 'Markersize', 20)

title('Strain (MPa) over Sensor Grid')
xlabel('x dist (m)'), ylabel('y dist (m)')
zlabel('strain (MPa)'), grid on


% Scatter Plot w/ Color
figure(2)
scatter(strain(:,1), strain(:,2), ...
   strain(:,3)*5, ...      % size
   strain(:,3), ...    % color
   'filled')

xlabel('x dist (m)'), ylabel('y dist (m)')
title('Strain (MPa) over Sensor Grid')
cc = colorbar(); title(cc,'MPa')
xlim([0 11]), ylim([0 11]), grid on
------------------------------------------------------------------------------------------------------------------------------------


HELP A BROTHER OUT
Thank you so much for watching! Please consider subscribing as a thank you if you benefited from this content! :D

HELPING MY BROTHERS AND SISTERS OUT
Comment below and I will happily answer all your questions, queries, and conundrums... whether or not they pertain to programming ;)

🤝 Support me on Patreon! Patreon: philparisi_
🌱 Want to say thanks? https://buymeacoffee.com/philparisi_
🌏 More on Insta! Instagram: philparisi_
🔥 And the rest! https://linktr.ee/philparisi_
2 سال پیش در تاریخ 1400/12/02 منتشر شده است.
6,849 بـار بازدید شده
... بیشتر