필터 지우기
필터 지우기

I want to change cart to polar !

조회 수: 1 (최근 30일)
Kwon
Kwon 2012년 11월 26일
I want to change cart coordinate to polar system
for example
I read a image file and this value change to double value.
then this array is 3d value
and this chage to polar system
and I want to plot(r,theta) this polar system value ( not polar(r,theta)!!)
I want to see the plot that is plotting linear!!
help about this!
if true
% clear all;
clc
a=imread('slice.png');
b=double(a);
imagesc(b);
center=b(512,512);
Z=zeros(2000,3);
for r=1:1:512;
for t=1:1:512;
x=512+r;
y=512+t;
theta=((tan(t/r))^(-1)*180/pi);
radi=sqrt(r^2+t^2);
bvalue=b(x,y);
end
Z=[Z;radi,theta,bvalue];
end
plot(Z);code
end

답변 (1개)

John Petersen
John Petersen 2012년 11월 29일
theta = atan2(t,r)*180/pi;

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by