No BSD License  

Highlights from
Clebsch Gordan Coefficient Solver GUI

image thumbnail
from Clebsch Gordan Coefficient Solver GUI by james jun
Easy to use Clebsch-Gordan coefficient solver for adding two angular momentums.

op_jplus( parent_i, parent_c )
function [ children_i, children_c ] = op_jplus( parent_i, parent_c )
%OP_JPLUS for a given parent, create children based on opjminus.
% if index is out of range, stop creating children and this result in 1
% children.  normally if the lowering operation doesn't end at the boundary
% number of chidren will be 2
%in
%   parent_i: [j1 m1 j2 m2] 
%   parent_c: coefficient for parent index, sym type
%out
%   children_i: 2x4 or 1x4 matrix
%   children_c: 2x1 or 1x1 matrix

j1 = parent_i(1);
m1 = parent_i(2);
j2 = parent_i(3);
m2 = parent_i(4);

children_i = [];
children_c = [];

if m1+1 <= j1
    children_i = [j1 m1+1 j2 m2];
    children_c = parent_c * coef_jplus(j1, m1);
end

if m2+1 <= j2
    children_i = [children_i; [j1 m1 j2 m2+1]];
    children_c = [children_c; parent_c * coef_jplus(j2, m2)];
end

Contact us at files@mathworks.com