File Exchange

image thumbnail

spharmPlot(L, resolution)

version 1.1 (1.88 KB) by

A simple function for plotting real basis of spherical harmonics with different orders.

4 Downloads

Updated

View License

% Syntax:
% spharmPlot(L, resolution)
% spharmPlot(L)
% spharmPlot()
%
% Inputs:%
% L: degree of the functions, default value = 2;
% resolution: resolution of sphere surface, default value = 500.
%
% Results:
% green regions represent negative values
% red regions represent positive values

Comments and Ratings (4)

Franck Zagala

nice, but sign mistakes (e.g. L=1, M={-1,1} inverted sign)

Stephan Koehler

Mengliu Zhao

@Tahariet "Errror when loading "redgreencmap". Help!" -- Maybe you're using a MATLAB version before2012a? See red and green colormap ref: http://www.mathworks.com/help/bioinfo/ref/redgreencmap.html

Actually you can use any colormap choice you want, e.g., colormap('default').

Errror when loading "redgreencmap". Help!

Updates

1.1

Corrected the sign of Legendre polynomials

MATLAB Release
MATLAB 8.3 (R2014a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video