Hi,
This is Pratim. I want to plot energy over a volume of cylinder such that its surfaces show energy in terms of color mapping. It will be a 4D plot. Can you please suggest me any suitable option.

 채택된 답변

Bjorn Gustavsson
Bjorn Gustavsson 2019년 9월 26일

0 개 추천

Perhaps you're asking for something like this:
[X,Y,Z] = cylinder(linspace(1,1.5,100),100); % You have to specify your cylinder, somehow - this is only an example
Q = peaks(100); % Some arbitrary values in a size that matches the size of X Y and Z
surf(X,Y,Z,Q),shading flat % display your energies on the cylindrical surface
colorbar
HTH

댓글 수: 1

Pratim Saha
Pratim Saha 2019년 9월 26일
The cylinder function generates a hollow cylinder but I need the top surface as well. I need to use 3d array for each of x, y, z and q to define the volume. Hence, I chose polar coordinate to start with. Then converted it into cartesian using pol2kart function. But surf is unable to handle 3d array. Can you please tell any alternative excluding scatter, slice commands.

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

추가 답변 (0개)

카테고리

태그

질문:

2019년 9월 26일

댓글:

2019년 9월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by