필터 지우기
필터 지우기

extract from strring row symbol

조회 수: 1 (최근 30일)
roborrr
roborrr 2022년 2월 27일
댓글: Voss 2022년 2월 27일
There is a column vector A, which consists of strring rows. Need to extract symbol numbered j from row numbered i , . How do I solve this problem?
example :
A=["abcd"
“efgh”
“ijklm”],
Need to extract symbol numbered 3 from row numbered 3, i.e. symbol "k"

채택된 답변

Voss
Voss 2022년 2월 27일
A=["abcd";"efgh";"ijklm"]
A = 3×1 string array
"abcd" "efgh" "ijklm"
row_symbol_idx = [3 3];
symbol = extract(A(row_symbol_idx(1)),row_symbol_idx(2))
symbol = "k"
  댓글 수: 4
roborrr
roborrr 2022년 2월 27일
thank you so much , it was very helpful.
Voss
Voss 2022년 2월 27일
You're welcome!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Symbolic Math Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by