MATLAB Error: Bad property value found

MATLAB Error: Bad property value found

我正在使用 Matlab R2014a。 以下是我的代码以及错误。

IterationColor = {'[0.0 0.0 0.0]',...
                  '[1.0 0.0 0.8]',...
                  '[0.2 0.0 1.0]',...
                  '[1.0 0.6 0.0]',...
                  '[0.2 0.4 0.0]',...
                  '[0.6 0.0 0.6]',...
                  '[1.0 0.0 0.0]',...
                  '[0.6 0.6 0.6]'};
IterationMarker = {'>','o','s','<','s','p','*','>','o','d'};

semilogy(x,y,'marker',IterationMarker{3},'color',IterationColor{8},'LineWidth',1,'MarkerEdgeColor',IterationColor{8},'MarkerFaceColor','[0 1 0]','MarkerSize',5);

Error using semilogy
Bad property value found.
Object Name: line
Property Name: 'Color'.

我不明白为什么会出现此错误,希望能为您提供帮助。

您的颜色矩阵不是矩阵,而是字符串。
在您的单元格定义中删除它们周围的引号。