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: correlation_to_text.m
    path of file: ./repos/CanlabCore/CanlabCore/Statistics_tools/Support_functions
    
    the code of the file until where you have to start completion: function [str,sigmat] = correlation_to_text(a,cm,varargin)
    %str = correlation_to_text(matrix,value to mark with *,[cell array of names])
    %
    % input:
    % a) correlation matrix and critical value
    % b) or correlation matrix and 1/0 indicator matrix of significant values

    
function [str,sigmat] = correlation_to_text(a,cm,varargin)
    %str = correlation_to_text(matrix,value to mark with *,[cell array of names])
    %
    % input:
    % a) correlation matrix and critical value
    % b) or correlation matrix and 1/0 indicator matrix of significant values
    %   (sigmat)
    % c) or raw data and empty cm value
    %   (determines threshold based on n)
    %
    % see also print_correlation.m
    %
    % Examples:
    % correlation_to_text(corrcoef(dat), [], names)
    % correlation_to_text(dat, [], names)
    % correlation_to_text(partialrs, p < .05, cat(2, {clneg_data.shorttitle}));

    if length(varargin) > 0, nms = varargin{1}; else nms = {[]}; end