x = 0:0.5:4*pi; % x 向量的起始與結束元素為 0 及 4π, 0.5 % 為各元素相差值 y = sin(x); plot(x, y, 'k:diamond') % 其中「k」代表黑色,「:」代表點線,而 % 「diamond 」則指定菱形為曲線的線標