Finding a column with specific text

조회 수: 7(최근 30일)
BENJAMIN BUCHDA
BENJAMIN BUCHDA 2021년 2월 15일
댓글: Star Strider 2021년 2월 15일
I am trying to create a function that takes a array of characters and finds the first column that has a specific input. It seems to work however when I ask have cells with multiple characters an error message saying matrix dimensions must agree. Not sure what I am doing wrong. Any suggestions?

채택된 답변

Star Strider
Star Strider 2021년 2월 15일
I have no clear idea of what the exact problem is, however using strfind or strcmp (or strcmpi) instead of the logical operation with ‘==’ could do what you want.
  댓글 수: 3
Star Strider
Star Strider 2021년 2월 15일
BENJAMIN BUCHDA — Als always, my pleasure!
Adam Danz — Thank you.
.

댓글을 달려면 로그인하십시오.

추가 답변(0개)

범주

Find more on Matrices and Arrays in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by