필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Fltering to subsets of matrices

조회 수: 1 (최근 30일)
David
David 2012년 5월 4일
마감: MATLAB Answer Bot 2021년 8월 20일
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
Sean de Wolski
Sean de Wolski 2012년 5월 4일
Please provide a small example (inputs/ops/expected outputs).

답변 (1개)

per isakson
per isakson 2012년 5월 4일
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
David
David 2012년 5월 22일
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 2012년 5월 22일
Does your code work now?

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by