フィルターのクリア

Convert table row into list

42 ビュー (過去 30 日間)
alice
alice 2017 年 6 月 6 日
回答済み: Walter Roberson 2017 年 6 月 6 日
I read a large file into MATLAB using readtable:
rrs_wvl = readtable('RRS_wvlgths_only.csv');
I'd like to just get the first row of the table as an array:
[0.0036847, 0.0037092, 0.0037337, 0.0037572]
But my current code keeps returning a table:
>> row = rrs_wvl(1,:);
x400 x401 x402 x403
_________ _________ _________ _________
0.0036847 0.0037092 0.0037337 0.0037572
I cannot figure out the syntax for it despite looking through the Table documentation . Is there another way to do this? Or should I use something other than readtable?

採用された回答

Geoff Hayes
Geoff Hayes 2017 年 6 月 6 日
alice - try using the braces (instead of brackets) as
row = rrs_wvl{1,:};
(This works for me with R2014a.)

その他の回答 (1 件)

Walter Roberson
Walter Roberson 2017 年 6 月 6 日
row = rrs_wvl{1,:};

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by