利用复数的乘法可完成平面上的旋转变换。每次逆时针转144°,则连转5次即可回到原点,即一笔画出五角星。用复数乘法的意义,可以很方便地计算出每个顶点的坐标,从而绘出五角星。下面给出了MATLAB源代码。 theta = 144/180*pi; n = 1:6; z = exp(i*theta*n); x = real(z); y = imag(z); fill( ...
clear,clc,close all; figure('color', );hold on x = 0:0.01:5; df = ; for n = 1:length(df) y = fpdf(x,df(n,1),df(n,2));plot(x,y,'linewidth',1); end text(1.22,0.6,'$$\leftarrow n_1=10,n2=40$$','interpreter','latex'); text(2,0.19, ...
clear,clc,close all; figure('color', );hold on x = -5:0.1:5; df = ; for n = 1:length(df) y = tpdf(x,df(n));plot(x,y,'linewidth',1); end text(-1,0.15,'$$\leftarrow n=1$$','interpreter','latex'); text(-0.8,0.25,'$$\lefta ...