MATLAB: Color code with dash line

color dash line

Hi,
Could you please tell me the correct code for the dash line with specific color
For colors with dash line such as red and blue, the code can be written as follows:
plot (x,y, 'r:');
my question here is about the above command but for specific color code as stated below:
plot (x,y, 'color',[0 0.5 0]);
Thanks,

Best Answer

x=1:10; plot(x, cos(x), ':','color',[0,0.5,0],'linewidth',3)