MATLAB: How to use input to get a desired line color and line style.

input color line style

I can't figure out how to allow a user to choose a line color/style. I have tried multiple things. Errors are usually:
Error using plot
Error in color/linetype argument.
Any help would be appreciated
clc clear all
Ax = input('Enter beginning x coordinate: '); Ay = input('Enter beginning y coordinate: '); Bx = input('Enter ending x coordinate: '); By = input('Enter ending y coordinate: '); color = input('Choose a color, type b(blue), r(red) or g(green): ','s'); style = input('Choose a line style, type ., :, -., or –: ','s');
plot([Ax,Bx],[Ay,By])

Best Answer

Did you try
plot([Ax,Bx], [Ay,By], [color, style]);