How to count negative and postive values in a matrix?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
trailokya
el 5 de Ag. de 2015
Comentada: trailokya
el 5 de Ag. de 2015
Sir, how can i get the mean and standard deviation and total numbers of negative values and similarly for positive values in a matrix A(i,j).Please help
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 5 de Ag. de 2015
s=sign(A)
ipositif=sum(s(:)==1)
inegatif=sum(s(:)==-1)
4 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Creating and Concatenating Matrices 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!