File Exchange

image thumbnail

Principal Component Analysis (PCA) in MATLAB

version 1.0 (1.72 KB) by

This is a demonstration of how one can use PCA to classify a 2D data set.

4.33333
8 Ratings

84 Downloads

Updated

View License

This is a demonstration of how one can use PCA to classify a 2D data set. This is the simplest form of PCA but you can easily extend it to higher dimensions and you can do image classification with PCA

PCA consists of a number of steps:
- Loading the data
- Subtracting the mean of the data from the original dataset
- Finding the covariance matrix of the dataset
- Finding the eigenvector(s) associated with the greatest eigenvalue(s)
- Projecting the original dataset on the eigenvector(s)

Note: MATLAB has a built-in PCA functions. This file shows how a PCA works

Comments and Ratings (8)

li xu

li xu (view profile)

shabnam

Fengjian Shi

A great example for PCA beginners.

Anuranjit

Adams Black

Good! but can i use it for image classfication pls?

Adams Black

zhu zhu

thanks!

Tobin

Tobin (view profile)

Thanks! This helped me to understand what PCA actually is about

MATLAB Release
MATLAB 7.5 (R2007b)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today