You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: spectralTransmission.m
    path of file: ./repos/mtex/TensorAnalysis/@refractiveIndexTensor
    
    the code of the file until where you have to start completion: function rgb = spectralTransmission(rI,vprop,varargin)
%
% Syntax
%   rgb = spectralTransmission(rI,vprop,p,thickness)
%
%   rgb = spectralTransmission(rI,vprop,p,thickness,'polarizationDirection',p)
%
%   rgb = spectralTransmission(rI,vprop,p,thickness,'phi',phi)
%
%   plot(rI.spectralTransmission(thickness))
%
%
% Input
%  rI - @refractiveIndexTensor
%  vprop - propagation direction
%  thickness - 
%  p - direction of the polarizer
%  tau - angle between polarizer and analyzer
%

    
function rgb = spectralTransmission(rI,vprop,varargin)
%
% Syntax
%   rgb = spectralTransmission(rI,vprop,p,thickness)
%
%   rgb = spectralTransmission(rI,vprop,p,thickness,'polarizationDirection',p)
%
%   rgb = spectralTransmission(rI,vprop,p,thickness,'phi',phi)
%
%   plot(rI.spectralTransmission(thickness))
%
%
% Input
%  rI - @refractiveIndexTensor
%  vprop - propagation direction
%  thickness - 
%  p - direction of the polarizer
%  tau - angle between polarizer and analyzer
%
% Example
%   thickness = 20000;
%   rI = refractiveIndexTensor.calcite
%   plot(rI.spectralTransmission(thickness),'rgb','3d')
%


% maybe we should compute a spherical function this works only for a fixed
% polarization direction
if isnumeric(vprop) && ~isempty(vprop)
  thickness = vprop;
  vprop = [];
else
  thickness = varargin{1};
  varargin(1) = [];
end