Matlab Legend Rejecting Cell Array of Strings for Input -
i have believe valid cell array of strings (prn_leg) input legend @ end of plot.
prn_leg = columns 1 through 6 '3' '7' '8' '9' '16' '19' columns 7 through 10 '23' '27' '31' '32'
however, when attempt
legend(prn_leg)
i following warning:
warning: error updating legend. index exceeds matrix dimensions. > in defaulterrorcallback (line 12) in tec_plotting (line 46)
and blank legend appears in figure.
i've looked on solutions , none of them seem work.
thanks much!
tom
the legend()
function expects column separated list of strings or cell array of strings, not vector of strings. therefore easiest way fix change input vector cell array, , legend should work, each element is:
prin_leg{1} = '3'; prin_leg{2} = '7', etc.
or per comments more efficiently:
prin_leg = {'3','7',...};
Comments
Post a Comment