t = 0:pi/50:10*pi;
t = [t nan];
st = sin(t);
ct = cos(t);
patch(t,st,ct,t,'edgecolor','flat','FaceColor','none','LineWidth',2);
view(3);
grid on;
colorbar
注意:没有nan会导致首尾有条连线
![在这里插入图片描述](https://www.icode9.com/i/ll/?i=20210114233037189.png?,type_ZmFuZ3poZW5naGVpdGk,shadow_10,text_aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzM3NzYxMTQ0,size_16,color_FFFFFF,t_70#pic_center)
标签:edgecolor,LineWidth,曲线图,渐变,nan,st,matlab,pi,ct
来源: https://blog.csdn.net/m0_37761144/article/details/112644971