필터 지우기
필터 지우기

Search Table for value using other variables

조회 수: 2 (최근 30일)
Doug
Doug 2020년 5월 27일
댓글: Doug 2020년 5월 28일
I am wanting to pull out and manipulate a value from the below table.
Using P1, P4 and P7 to output the value from P8.
Help would be appreciated with this issue.

채택된 답변

Cris LaPierre
Cris LaPierre 2020년 5월 28일
편집: Cris LaPierre 2020년 5월 28일
ind = t.P1==48.3 & t.P4==16 & t.P7==44.79;
valP8 = t.P8(ind)
Of course you'll have to use the actual table and full variable names from your table.
  댓글 수: 3
Cris LaPierre
Cris LaPierre 2020년 5월 28일
t2.varName = t.P8;
Just keep in mind that t2 will have to have the same number of rows as t.
Doug
Doug 2020년 5월 28일
Thanks heaps Cris. Much appreciated.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by