フィルターのクリア

Evaluating and plotting a polar function, in cartesian coordinates.

1 回表示 (過去 30 日間)
simone clochiatti
simone clochiatti 2016 年 4 月 24 日
編集済み: simone clochiatti 2016 年 4 月 24 日
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

回答 (0 件)

カテゴリ

Help Center および File ExchangePolar Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by