フィルターのクリア

Convert MATLAB code compatible with version 2011

1 回表示 (過去 30 日間)
Damith
Damith 2014 年 11 月 17 日
回答済み: Chad Greene 2014 年 11 月 17 日
Hi,
Can somebody help me to convert the piece of code below compatible with MATLAB 2011 version?
tr = readtable('100303.csv','ReadVariableNames',0);
isnneg = @(x) x>=0;
tc = table2cell(tr);
valrow = cellfun(isnneg,tc(:,6));
tcval = tc(valrow,:);
Thanks in advance.

回答 (1 件)

Chad Greene
Chad Greene 2014 年 11 月 17 日
Instead of readtable, use textscan, and you won't need table2cell.
fid = fopen('100303.csv')
tc = textscan(fid,...)
You'll need to adjust the inputs of textscan to properly reflect your text file's number of columns and header lines. Then tc{1} will correspond to column 1, tc{2} is column 2, etc.

カテゴリ

Help Center および File ExchangeData Type Conversion についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by