フィルターのクリア

May I know how convert tuple to dictionary in MATLAB

4 ビュー (過去 30 日間)
Gireesh Kumar
Gireesh Kumar 2021 年 9 月 21 日
回答済み: Walter Roberson 2021 年 9 月 21 日
Please see attached xls file. I want to convert tuple in column B to dictionary

回答 (1 件)

Walter Roberson
Walter Roberson 2021 年 9 月 21 日
filename = 'https://www.mathworks.com/matlabcentral/answers/uploaded_files/744999/New%20Microsoft%20Office%20Excel%20Worksheet.xlsx';
T = readtable(filename, 'readvariablenames', false);
dict = containers.Map(T{:,1}, str2double(T{:,2}))
dict =
Map with properties: Count: 1234 KeyType: char ValueType: double

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by