フィルターのクリア

How do you search a file for a matching string?

1 回表示 (過去 30 日間)
Vinay kumar Reddy
Vinay kumar Reddy 2013 年 2 月 2 日
Hi,
I have a huge contacts list in a excel file which consists of following fields
FirstName LastName UserID EmailAddress.
I have FirstName and LastName in MATLAB as a variable.
How do I extract the user ID and EmailAddress for a corresponding FirstName and LastName?
Note:There are some 50,000 contacts in Excel file.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 2 月 2 日
[num,text,v]=xlsread('yourfile')
s1='firstname';
s2='lastname';
idx=find(strcmp(v(:,1),s1) & strcmp(v(:,2),s2)
Id=v(idx,3)
Email=v(idx,4)

その他の回答 (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