# How to plot 5D in MATLAB

조회 수: 29 (최근 30일)
ANANTA BIJOY BHADRA . 2023년 5월 10일
편집: Cris LaPierre . 2023년 9월 25일
I have four variables and one output. The variables are A, B, C, D. All are 11*1 matrix. Based on the four avriables, the Z is calculated. I would like to plot A, B, C, D, Z as a 5D plot. Is it possible in MATLAB? If possible, How can I do that?
##### 댓글 수: 3이전 댓글 2개 표시이전 댓글 2개 숨기기
the cyclist 2023년 5월 12일
Are you able to hand-draw what your five-dimensional plot would look like, and upload the image?

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

### 채택된 답변

Cris LaPierre 2023년 5월 10일
Your first 3 dimensions can be visualized on a cartesian axes (X,Y,Z). You'll need to get creative to view higher dimensions. For those dimensions, you can look into varying color, size, or marker shape to convey information about higher dimensions.
So here, I would try scatter3 with the following syntax:
##### 댓글 수: 2이전 댓글 1개 표시이전 댓글 1개 숨기기
ANANTA BIJOY BHADRA 2023년 5월 22일
Yes. Your code gave me the exact answers that I needed. Thank you.

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

### 추가 답변 (1개)

Walter Roberson 2023년 5월 12일
You cannot. A screen has two independent physical coordinates. You can use animation to add a time coordinate. You can use color to represent another coordinate. That is four coordinates representable, but you have five coordinates.
##### 댓글 수: 1없음 표시없음 숨기기
Walter Roberson 2023년 5월 12일
Ah, I had forgotten a possibility. You could code at least part of your project in Simulink, and build a Virtual Reality World, https://www.mathworks.com/help/sl3d/build-virtual-reality-worlds.html . With appropriate VR googles, that would give you an apparent additional dimension. However... the encoding of one of the dimensions in virtual space requires that you have time to move your head position to get different viewpoints, and to some degree that conflicts with using time to encode one of the physical coordinates. You would need to make compromises such as making the time-encoded coordinate relatively slow compared to the rate you would be likely to want to move your head to access the virtual physical coordinates.

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

### 카테고리

Help CenterFile Exchange에서 Lighting, Transparency, and Shading에 대해 자세히 알아보기

R2022a

### Community Treasure Hunt

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

Start Hunting!

Translated by