Fixe the number of digit when creating matrix
2 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
Matt Fig
2012 年 8 月 9 日
Give an example of the numbers you mean. Are you mixing types? What does
whos A B
show?
採用された回答
Matt Fig
2012 年 8 月 9 日
That is what I thought... Concatenating types like this will cause MATLAB to make M into an int32
M = [A,double(B)]
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!