Fixe the number of digit when creating matrix
조회 수: 1 (최근 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!