function [Mt, Ms] = mirror(R, a1, n) % [Mt, Ms] = mirror(R, a1, n) if length(R) > 1 Rt = R(1); Rs = R(2); else Rt = R; Rs = R; end % degrees to radians a1 = a1 * pi / 180; % tangential Mt = [1 0; -2*n/cos(a1)/Rt 1]; % sagittal Ms = [1 0; -2*n*cos(a1)/Rs 1];