Plotting a summation as a function of two variables

1 回表示 (過去 30 日間)
Pablo
Pablo 2017 年 7 月 20 日
コメント済み: Fatma Abdullah 2017 年 7 月 20 日
Hello, Sorry I'm new to matlab and I couldn't work out the solution to this question with the help.
I'm plotting a function of \theta and \phi as a density plot over the surface of the sphere.
For an easy function f, I had luck using the following code:
res = 50;
lambda = linspace(-pi,pi,res);
theta = linspace(-pi/2,pi/2,ceil(res/2));
[L,T] = meshgrid(lambda,theta);
n=10;
f=(n.*(cos((T-pi/2)/2)).^2+1).*exp(-n.*(sin((T-pi/2)/2).^2));
[X,Y,Z] = sph2cart(L,T,1);
clf;
surf(X,Y,Z,f);
Now I'm trying to do the same but with a more difficult function you can see here
with \mu \nu numbers... We can use a simpler function as a minimal example, like
\sum_{S=0}^{1000} (2S+1) (cos(\theta/2))^2
How can I do to represent this function (of \theta and \phi)over the sphere just like I did with the example below?
Many Thanks
  1 件のコメント
Fatma Abdullah
Fatma Abdullah 2017 年 7 月 20 日
do you have any values for mue, v, and N ?!

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by