MATLAB: Extracting values from table/ matrices

extracting data from tables/matrices

I have a table with three columns (a,b,c) and hundreds of rows. How can I extract all the values of b and c when a=x?

Best Answer

TablE(TablE.a == x, 2:3) % x is a numeric scalar , use strcmp(...) if it’s a string or a char