I create a 3D column vector and plot it using scatter3. When I was using a row vector the code was working fine but with column vector I'm unable to get the x y z values.
v = 2 * randi(2, 3, 1) - 3;
x = v(:, 1);
y = v(:, 2);
z = v(:, 3);
figure
scatter3(x, y, z);
Thank you.

 채택된 답변

KSSV
KSSV 2016년 10월 31일

0 개 추천

v = 2 * randi(2, 3, 1) - 3;
x = v(1,:);
y = v(2,:);
z = v(3,:);
figure
scatter3(x, y, z);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

질문:

N/A
2016년 10월 31일

답변:

2016년 10월 31일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by