MATLAB: How to check if a value is a correct color checkingcolorisvalid Whether there is a function like logical = isvalidcolor(value) to check if some value may be used like a color (one of values specified in ColorSpec e.g.) Best Answer Not that I'm aware of - there's just not that much need - though you could write one if you want. Related SolutionsMATLAB: I keep getting this error Error: File: BarcodeRea​derLiveScr​ipt.m Line: 242 Column: 5 Illegal use of reserved keyword “else”. Do not doif color=='black' do this instead:if strcmpi(color, 'black') MATLAB: Graphing colors You can use the few matlab built in colors ('red','green,'blue,'black','white','cyan','magenta','yellow'),plot(...,'color','green',...)but you could also just declare a variable that is that vector, i.e.g = [0 0 1]plot(...,'color',g,...) Related QuestionHow to detect yellow and white colors simultaneously in a live video?Colour specification for gray colourHow can convert binary Numerical Values to StringsToo many output arguments help
Best Answer