MATLAB: How to change the linewidth of a curve in a graph by using code

linewidth

like:
x=linspace(0,2*pi);
y=sin(x)
I want the sine curve's linewidth is 2.

Best Answer

use linewidth
x=linspace(0,2*pi);
y=sin(x);
plot(x, y, 'linewidth',2)