how to search specific data from matlab to excel

1 回表示 (過去 30 日間)
Mettri Wibawanti
Mettri Wibawanti 2021 年 10 月 25 日
コメント済み: Ive J 2021 年 10 月 26 日
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

採用された回答

Ive J
Ive J 2021 年 10 月 25 日
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 件のコメント
Mettri Wibawanti
Mettri Wibawanti 2021 年 10 月 25 日
編集済み: Mettri Wibawanti 2021 年 10 月 25 日
its work! thank you so much, but may i ask again, how if i use like
T = input ('plate number :','s'); %and then i put R1280XS
tab(ismember(tab.(1), 'T'), :)
why it can't shows it ? thank you, i really appreciate your help :)
Ive J
Ive J 2021 年 10 月 26 日
Just change your second line to:
tab(ismember(tab.(1), T), :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by