How to project a N*N matrix on a circular shape without loosing any data?

조회 수: 2 (최근 30일)
Dear community;
I have a 60 by 60 matrix that represents a temperature profile over a circular surface.
I need to represent the temperature distribution on a circular shape rather show on a rectangular shape.
In time I use imagsc but I am not able to reproduce a circular (heat map like) plot.

채택된 답변

Walter Roberson
Walter Roberson 2024년 1월 23일
  댓글 수: 3
Walter Roberson
Walter Roberson 2024년 1월 25일
How did the polor to rectangular contribution work out for you?
Ali Hariri
Ali Hariri 2024년 1월 26일
Actually I am now able to reproduce a polar circle shape to report a heat map's like output. Thank you so much.

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

추가 답변 (1개)

Mathieu NOE
Mathieu NOE 2024년 1월 23일
hello
maybe this ?
% your temperature data
N = 60;
temp_data = 50+10*peaks(N);
% Generate basic cylinder
t = (0:2*pi:2*pi*(N-1))/N;
% r = 2 + 0*sin(t/2); % straigth cylinder
r = 2 + sin(t/2); % inflated cylinder (tire)
[X,Y,Z] = cylinder(r,N);
surf(X,Y,Z,temp_data)
colormap(jet)
colorbar('vert')
  댓글 수: 5
Ali Hariri
Ali Hariri 2024년 1월 25일
Thank you so much. I have used both recommendations by you and @Walter Roberson. Initially, I made a mistake, then I see your reccomentatios were actully works.
Thank you so much
Mathieu NOE
Mathieu NOE 2024년 1월 26일
ok, so you should accept Walter's answer

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

카테고리

Help CenterFile Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by