필터 지우기
필터 지우기

3 D plot with three input and one output

조회 수: 19 (최근 30일)
Danish Nasir
Danish Nasir 2021년 8월 24일
편집: KSSV 2021년 8월 24일
I have input data in the form of matrix column. Coulmn 1 represent x1, column2 represent x2, Coulmn 3 represent x3. My output is the 4th column of the matrix as K.
I want to plot x1,x2,x3 on x,y,z axis and then want output K represent on the 3D graph
x1 x2 x3 K
Matrix= [ 9 3 4 324880.4
7 4 4 278983.1
5 5 3 256614.1
5 6 2 245502.9
4 7 1 240079.1
4 8 4 239987.4 ]
Pls provide the code to plot 3D graph for the above data
  댓글 수: 1
Turlough Hughes
Turlough Hughes 2021년 8월 24일
I assume x1,x2,x3 represent a line in 3d? How do you want to show K - as changes in the line colour?

댓글을 달려면 로그인하십시오.

답변 (1개)

KSSV
KSSV 2021년 8월 24일
편집: KSSV 2021년 8월 24일
Matrix= [ 9 3 4 324880.4
7 4 4 278983.1
5 5 3 256614.1
5 6 2 245502.9
4 7 1 240079.1
4 8 4 239987.4 ] ;
x = Matrix(:,1) ;
y = Matrix(:,2) ;
z = Matrix(:,3) ;
c = Matrix(:,4) ;
scatter3(x,y,z,1000,c,'.');
colorbar

카테고리

Help CenterFile Exchange에서 Scalar Volume Data에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by