Problem with textscan in matlab 2016a

1 回表示 (過去 30 日間)
Rica
Rica 2016 年 6 月 2 日
コメント済み: Star Strider 2016 年 6 月 2 日
Hi together, i attached a text file and the matlab script. I run the script with matlab2014 and matlab2016a. Why there is a difference in the result. the result with 2014 ist the wanted result.
Thank you for your help.

採用された回答

Star Strider
Star Strider 2016 年 6 月 2 日
I’m not certain what problem you are having.
This works for me in R2016a:
fidi = fopen('Rica Test_1.txt','rt');
Ac = textscan(fidi, '%f%f%f%f%f', 'HeaderLines',1, 'CollectOutput',1);
A = cell2mat(Ac);
The cell2mat call converts the cell array ‘Ac’ to double array ‘A’.
  2 件のコメント
Rica
Rica 2016 年 6 月 2 日
the problem is when you check A{1,1}{1,1} in Matlab2014, i see 860 double. in Matlab 2016a i get only one double.
thanks
Star Strider
Star Strider 2016 年 6 月 2 日
The ‘A’ matrix in my code is a (860x5) double array. It is not a cell array, so there is no need to use cell indexing with it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLarge Files and Big Data についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by