Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

Fltering to subsets of matrices

1 visualización (últimos 30 días)
David
David el 4 de Mayo de 2012
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
both Excel and Sql can 'query' and run functions on subsets of data based on common lable fields (e.g. return all sales in GA)
sum if 'GA' or count if 'GA'
Does Matlab have similare functionality?
  1 comentario
Sean de Wolski
Sean de Wolski el 4 de Mayo de 2012
Please provide a small example (inputs/ops/expected outputs).

Respuestas (1)

per isakson
per isakson el 4 de Mayo de 2012
Yes!
sum( MyData( strcmp( MyData( :, ixColumn ), 'GA' ), : ), 1 )
This question is very close to Summing values with database "group by" functionality. It is a better tactic to provide a toy example than repeating the question! Didn't the answers to you other question help you?
  2 comentarios
David
David el 22 de Mayo de 2012
Sorry, but I was not successful using the previous answer and I assumed it was because of the way I framed my question - which is why I tried to improve my question.
per isakson
per isakson el 22 de Mayo de 2012
Does your code work now?

La pregunta está cerrada.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by