Fixe the number of digit when creating matrix
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I try to create a matrix with 2 objects: A a list of numbers with 4 digits B a matrix of numbers with 0 digits
I used M = [A, B]
But when I do that I lose the 4 digits of A and all numbers in my matrix have 0 digits. How to keep the numbers of digits of A while creating the matrix?
Thanks
2 Kommentare
Matt Fig
am 9 Aug. 2012
Give an example of the numbers you mean. Are you mixing types? What does
whos A B
show?
Akzeptierte Antwort
Matt Fig
am 9 Aug. 2012
That is what I thought... Concatenating types like this will cause MATLAB to make M into an int32
M = [A,double(B)]
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!