Filter löschen
Filter löschen

I want to change cart to polar !

1 Ansicht (letzte 30 Tage)
Kwon
Kwon am 26 Nov. 2012
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

Antworten (1)

John Petersen
John Petersen am 29 Nov. 2012
theta = atan2(t,r)*180/pi;

Kategorien

Mehr zu Polar Plots finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by