文件名称:玫瑰花 源代码
文件大小:4KB
文件格式:M
更新时间:2016-10-28 07:45:17
玫瑰花
用MATLAB画玫瑰花的程序代码 % 画树枝 function draw_branch(zhuzhi) for k=1:size(zhuzhi,1) t=(zhuzhi(k,3):zhuzhi(k,4))*pi/180-pi; x1=zhuzhi(k,1)+zhuzhi(k,5)*cos(t); y1=zhuzhi(k,2)+zhuzhi(k,6)*sin(t); x1=2*zhuzhi(k,1)-x1; plot(x1,y1,'g','linewidth',2); end