필터 지우기
필터 지우기

Revolving a 2D plot around its vertical axis to generate 3D surface

조회 수: 17 (최근 30일)
Asser Abdelgawad
Asser Abdelgawad 2022년 6월 13일
댓글: Matt J 2022년 6월 16일
While this solution is helpful, the usage of repmat makes it so that the values are repeated and not unique. What I would like to do is convert to polar and rotate without repeating values. Is there a way to execute the revolution without repmat?
  댓글 수: 2
SAA
SAA 2022년 6월 13일
편집: SAA 2022년 6월 13일
cart2pol would transform to polar from cartesian.
Asser Abdelgawad
Asser Abdelgawad 2022년 6월 13일
Hmm but is there a way to do it besides repmat? For instance:
theta = linspace(0, 2*pi, 100);
for i=1:100
theta=pi/180*theta(i);
t_theta=X.*cos(theta)+Y.*sin(theta);
vals=interp1(x , y, t_theta(:),'pchip');
end

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

채택된 답변

Matt J
Matt J 2022년 6월 13일
  댓글 수: 18
Asser Abdelgawad
Asser Abdelgawad 2022년 6월 16일
So the IFFT function yields different results than the analytical inverse fourier transform? I did know that to be honest. OK, so you're saying I'm better off coding the transform function from scratch, with the integral and all?

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

추가 답변 (0개)

카테고리

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

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by