MATLAB Answers

how to search specific data from matlab to excel

1 view (last 30 days)
Mettri Wibawanti
Mettri Wibawanti on 25 Oct 2021
Commented: Ive J on 26 Oct 2021
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
when i search R1280XS at matlab, 11 12 10 will display in matlab
please help me, i'm stuck with it

Accepted Answer

Ive J
Ive J on 25 Oct 2021
tab = readtable('myExcel.xlsx'); % see doc for more options
tab(ismember(tab.(1), 'R1280XS'), :) % the row at which the input str matches the first table's column
  2 Comments
Ive J
Ive J on 26 Oct 2021
Just change your second line to:
tab(ismember(tab.(1), T), :)

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!