Borrar filtros
Borrar filtros

Evaluating and plotting a polar function, in cartesian coordinates.

1 visualización (últimos 30 días)
simone clochiatti
simone clochiatti el 24 de Abr. de 2016
Editada: simone clochiatti el 24 de Abr. de 2016
I have to plot in cartesian coordinates a function that is in polar coordinates. The summation over 200 terms is only an expansion for accuratly approximation. I intentionally commented %y=0:0.05:5; and leaved y=0 just to let you know that with y=0 "e" becomes a row vector that correctly gives me the values of the expansion over all the x axis (0:0.05:5), what I want is that "e" becomes a matrix in which every element is the value of the expression "e=besselj(n,2.*pi.*sqrt(x.^2+y.^2)).*cos(n*atan(y./x))" over all the cartesian x-y plane. In other words the script I wrote just correctly gives me the values on the x axis, but I need the values of "e" for every other row over the y axis. I know it should be simple, but I am new to matlab, so can somebody kindly explain me how to do it? Thank you in advance.
x=0:0.05:5;
%y=0:0.05:5;
y=0;
for n=1:200 e=besselj(n,2.*pi.*sqrt(x.^2+y.^2)).*cos(n*atan(y./x));
end

Respuestas (0)

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