Filter löschen
Filter löschen

Evaluating and plotting a polar function, in cartesian coordinates.

1 Ansicht (letzte 30 Tage)
simone clochiatti
simone clochiatti am 24 Apr. 2016
Bearbeitet: simone clochiatti am 24 Apr. 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

Antworten (0)

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