Search Table for value using other variables
2 次查看(过去 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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/302898/image.png)
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!