MATLAB: Indexing of a table.

MATLAB

I have a table called "diagramoptions". This table has 2 columns. With the name Key and Value. For example i want to know the value from number_of_plots. How can i get the number 4? See attachment Picture
My idea: I search the row index of the variable number_of_plots. -> then i try to get the right cell -> (row_index,2) the number 2 is the second column in my table. The return value should be 4.
I tried a lot without any results:
test_value2 = diagramoptions(3,1)% I know it works but it is hardcoded
test_value3 = diagramoptions(:,{'Key'})
thank you

Best Answer

colorval = diagramoptions{3,2}
Your table will be a cell of size 8x2, to pick number of plots you have to give index (3,2) as it's value falls in the index.