Quantcast
Channel: MATLAB Central Newsreader Recent Posts
Viewing all articles
Browse latest Browse all 19628

principal component analysis

$
0
0
clc;
close all;
clear all;
a=imread('cameraman.tif');
x=pca2(a);

pca2.....

function [signals,PC,V]=pca2(data)
[M,N]=size(data);
mn=mean(data,2);
data=data - repmat(mn,1,N);
Y=data'/sqrt(N-1);
[u,S,PC]=svd(Y);
S=diag(S);
V=S.*S;
signals=PC'*data;
an error occurs while executing this program..Integers can only be combined with integers of the same class, or scalar doubles.
i couldn't figure out wat can somebody help me

Viewing all articles
Browse latest Browse all 19628

Trending Articles