Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
次の行を含む textscan を使用してファイルを読み込もうとしています
1.0 2.0 3.0 ? 6.0 5.0
11.0 12.0 13.0 15.0 16.0 15.0
21.0 22.0 23.0 25.0 26.0 25.0
31.0 32.0 33.0 ? 36.0 35.0
疑問符をナンに置き換えるにはどうすればよいですか?
結果のセル配列を数値に変換するために使用したり、使用したりtextscanしましたか%s %s %s %s %s %sstr2double
textscan
%s %s %s %s %s %s
str2double
f = fopen('file.txt'); raw = textscan(f, '%s %s %s %s %s %s'); data = []; for k = 1:6 data = [data str2double(raw{k})]; end