Summing Matrices after textscan/ formatspec issue?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Philip Hoskinson
am 18 Mär. 2016
Kommentiert: Philip Hoskinson
am 18 Mär. 2016
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 Kommentare
Akzeptierte Antwort
Walter Roberson
am 18 Mär. 2016
You should be using %f format for reading numbers with decimal points.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Text Files finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!