I am trying to perform a dimension reduction using pca in Matlab. From this code below, I get coefficient, score, latent, and t-squared. However, it is still fuzzy to me how to reduce the actual dimension from pc analysis. What I want to do is to reduce the number of column (which is 3 originally in this case) to 1 or 2. Can you please tell me how to do it?
matrix = [ 1 2 3; 4 3 2; 1 3 5; 4 2 3; 1 2 3; 2 1 3];
[coeff, score, latent, tsquared] = pca(matrix);