Borrar filtros
Borrar filtros

I want to change cart to polar !

1 visualización (últimos 30 días)
Kwon
Kwon el 26 de Nov. de 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

Respuestas (1)

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

Categorías

Más información sobre Polar Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by