how to search specific data from matlab in excel

4 views (last 30 days)
how to search specific data from matlab to excel and then display the row that include the data i've searched to matlab, for example i have an excel data
R1280XS 11 12 10
B2015AT 14 10 10
D1112FM 10 14 15
tab = readtable('tubes18.xlsx');
T = input ('plate number :','s'); %and then i put R1280XS
tab(ismember(tab.(1), 'T'), :)
so 11 12 10 will display in matlab, but when i use that why the row (11 12 10) can't displayed ?
please help me, i'm stuck with it

Accepted Answer

Chris on 26 Oct 2021
The last line is looking for a string 'T' in the first column of the table. You want to search for the variable T (no quotes). Try:
tab(ismember(tab.(1), T), :)

More Answers (0)

Community Treasure Hunt

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

Start Hunting!