Summing Matrices after textscan/ formatspec issue?
1 回表示 (過去 30 日間)
古いコメントを表示
Philip Hoskinson
2016 年 3 月 18 日
コメント済み: Philip Hoskinson
2016 年 3 月 18 日
I imported data with textscan because of multiple delimiters: it creates matrices of:
[20x20 int64] [20x20 int64] [20x20 int64]
[20x20 int64] [20x20 int64] [20x20 int64]
[20x20 int64] [20x20 int64] [20x20 int64]
I just guessed the formatspec, the data are numbers:
[[ 60.43 , 2349.33] , [..]] etc
Now I need to add the matrices and I get this error:
Error using +
Integers can only be combined with integers of the same
class, or scalar doubles.
How do I pick the proper formatspec/ make them scalar doubles?
0 件のコメント
採用された回答
Walter Roberson
2016 年 3 月 18 日
You should be using %f format for reading numbers with decimal points.
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Text Files についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!