%

% Copyright 2017-2018 The MathWorks, Inc.
function str = toString(this, variableName)
    str = strings(size(this));
    prefix = " ";
    if strlength(variableName) == 0
        prefix = "";
    end

    str([this.writeDimension]) = prefix + "(" + ...
        string([this([this.writeDimension]).dimensions]).join(',', 1) + ...
        ")";
    str([this.showReal]) = str([this.showReal]) + " " + ...
        message('sl_xls:Complexity:RealSuffix').getString;
    str([this.showImag]) = str([this.showImag]) + " " + ...
        message('sl_xls:Complexity:ImagSuffix').getString;

    str = string(variableName) + str;
end
