Search Table for value using other variables
조회 수: 3 (최근 30일)
이전 댓글 표시
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.
댓글 수: 0
채택된 답변
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
2020년 5월 28일
t2.varName = t.P8;
Just keep in mind that t2 will have to have the same number of rows as t.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!