Radial vector to circular plot

조회 수: 3 (최근 30일)
Roel
Roel 2018년 5월 8일
댓글: Pablo Venegas 2022년 3월 18일
Hello all,
I have a 5001 x 1 vector which contains information about the intensity of a radially symmetric object. I would like to make an intensity plot of the circular object, preferably with imagesc, which would look like a circle with a radius of 5001.
The general shape would look somewhat like the contour plot below but I'm looking for a way to get the actual values to show, not a contour plot.
Thanks
  댓글 수: 2
Jan
Jan 2018년 5월 8일
Why do you want imagesc? WHat is the problem with the shown graphics? What are the "actual values" compared to shown image?
Roel
Roel 2018년 5월 8일
편집: Roel 2018년 5월 8일
I want to use imagesc because I'm writing a report with comparisons to other cases where I've used imagesc. The shown contour plot shows contours whereas the actual values are more gradient. Below imagesc(I) where I is the vector.
I want to make a 'circular' version of this, to put it vaguely...

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

채택된 답변

Roel
Roel 2018년 5월 16일
My question has been answered somewhere else:
% Construct quarter slice
n = length(I)
I = [I;zeros(n,1)];
[X, Y] = meshgrid(1:n, flip(1:n));
r = round(sqrt(X.^2 + Y.^2));
A = reshape(I(r(:)), n, n);
% Plot whole beam slice without doubling
imagesc([fliplr(A) A(:,2:end) ; fliplr(flipud(A(2:end,:))) flipud(A(2:end,2:end))]);
colorbar; xlim([0 2*num-1]);ylim([0 2*num-1]);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Bar Plots에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by