plotting matrices in scatter form
조회 수: 3 (최근 30일)
이전 댓글 표시
Hello
I was wondering if there is a way to get a scatter plot by just plugging in the matrix as opposed to
scatter(x,y,z) %Assuming the matrix has three columns
The columns of the matrix still represents the values for each axis, but I do not want to have to index like this: x=Matrix(:,1) y =Matrix(:,2) z=Matrix(:,3)
Is there a command like the following: somecommand(Matrix) and I get the same results?
Thank You
댓글 수: 2
madhan ravi
2019년 4월 7일
but I do not want to have to index like this: x=Matrix(1,:) y =Matrix(2,:) z=Matrix(3,:)
?
답변 (1개)
David Wilson
2019년 4월 8일
Not easily, but the disperse function from the user's group (see https://au.mathworks.com/matlabcentral/fileexchange/33866-disperse) helps in these situations.
[x,y,z] = disperse(Matrix);
scatter(x,y,z)
댓글 수: 3
Walter Roberson
2019년 4월 8일
If you had a matrix with more than 3 columns, then what should be used for the X axis and what should be used for the Y axes and what should be used for the Z axes ? For example, if the matrix had 5 columns, then what would the equivalent scatter() commands be ?
참고 항목
카테고리
Help Center 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!