error in Correlation Coef
1 visualización (últimos 30 días)
Mostrar comentarios más antiguos
Seemab Janjua
el 23 de Nov. de 2016
Comentada: Seemab Janjua
el 23 de Nov. de 2016
i am using code
ddt=randn(10,3); ddm=randn(10,1); nd=size(ddt,2); for i=1:nd tw(i) = corrcoef(ddt(:,i),ddm);
end;
but getting error " In an assignment A(I) = B, the number of elements in B and I must be the same.
tw(i) =
corrcoef(ddt(:,i),ddm); how to get rid off this error .
0 comentarios
Respuesta aceptada
Walter Roberson
el 23 de Nov. de 2016
When you pass in two variables to corrcoeff the output is a 2 by 2 numeric array, not a scalar.
Más respuestas (0)
Ver también
Categorías
Más información sobre Image Segmentation and Analysis 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!