error in pca code
    2 visualizaciones (últimos 30 días)
  
       Mostrar comentarios más antiguos
    
    Neo
      
 el 8 de Dic. de 2022
  
hello I am trying to determine the pca graph for a couple of images but I get errors:
rng 'default'
M = 7; % Number of observations
N = 5; % Number of variables observed
X = rand(M,N);
% De-mean
X = actin2.tif
% Do the PCA
[coeff,score,latent] = pca(X);
% Calculate eigenvalues and eigenvectors of the covariance matrix
covarianceMatrix = cov(X);
[V,D] = eig(covarianceMatrix);
errors
>> untitled
Unable to resolve the name 'actin2.tif'.
Error in untitled (line 1)
coeff = pca(actin2.tif)
I want to classify the images by the different morphology.
0 comentarios
Respuesta aceptada
  Bora Eryilmaz
    
 el 8 de Dic. de 2022
        So instead of 
X = actin2.tif
you need
X = imread('actin2.tif')
0 comentarios
Más respuestas (0)
Ver también
Categorías
				Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

