当前位置: 首页 > news >正文

什么网站做电子元器件上海搜索优化推广

什么网站做电子元器件,上海搜索优化推广,便宜购物网站大全,wordpress博客伪静态目录 要点 基本语句 EraseMode 习题 1 设置颜色 2 旋转蕨型叶图 3 枝干 4 塞平斯基三角形 要点 蕨型叶是通过一个点的反复变换产生的,假设x是一个含有两个分量的向量,可以用来表示平面内的一个点,则可以用Axb的形式对其进行变换。 基本…

目录

要点

基本语句

 EraseMode

习题

1 设置颜色

2 旋转蕨型叶图

3 枝干

4 塞平斯基三角形


要点


        蕨型叶是通过一个点的反复变换产生的,假设x是一个含有两个分量的向量,可以用来表示平面内的一个点,则可以用Ax+b的形式对其进行变换。


基本语句


 

 语句darkgreen=[0 2/3 0]设置深绿色的颜色变量,在matlab中用红绿蓝分量来表示颜色,这里将绿色分量设置为2/3,其余为0。

采用animatedline来绘制蕨型叶,h为蕨型叶图形的句柄。

function fern_ashgclf resetset(gcf,'color','white','menubar','none', ...'numbertitle','off','name','Fractal Fern')x = [.5; .5];h = animatedline('Marker', '.', 'LineStyle', 'none', 'Color', [0 2/3 0]);axis([-3 3 0 10])axis off  %不显示坐标轴,只显示叶子本身stop = uicontrol('style','toggle','string','stop', ...'background','white');drawnow %绘制p  = [ .85  .92  .99  1.00];A1 = [ .85  .04; -.04  .85];  b1 = [0; 1.6];A2 = [ .20 -.26;  .23  .22];  b2 = [0; 1.6];A3 = [-.15  .28;  .26  .24];  b3 = [0; .44];A4 = [  0    0 ;   0   .16];cnt = 1; %将计数器的初始值设置为1ticwhile ~get(stop,'value')r = rand;if r < p(1)x = A1*x + b1;elseif r < p(2)x = A2*x + b2;elseif r < p(3)x = A3*x + b3;elsex = A4*x;endaddpoints(h, x(1), x(2));drawnow %重新绘制图形cnt = cnt + 1; %生成新的点后计数器的数值自增1endt = toc; %读取秒表数据s = sprintf('%8.0f points in %6.3f seconds',cnt,t);text(-1.5,-0.5,s,'fontweight','bold');set(stop,'style','pushbutton','string','close','callback','close(gcf)')
end


 EraseMode


EraseMode 属性不再受支持,而且在以后的版本中会出错。

初始语句:

h = plot(x(1),x(2),'.');
darkgreen = [0 2/3 0];
set(h,'markersize',1,'color',darkgreen,'erasemode','none');

修改后:

h = animatedline('Marker', '.', 'LineStyle', 'none', 'Color', [0 2/3 0]);

习题


1 设置颜色

   在MATLAB中,颜色可以使用多种方式来表示,其中一种常用的方式是使用RGB(Red-Green-Blue)表示法。在RGB表示法中,每个颜色的红、绿、蓝三个分量的取值范围为0到1,表示颜色的深浅程度。

  

function fern_ashgclf resetset(gcf,'color','black','menubar','none', ...'numbertitle','off','name','Fractal Fern')x = [.5; .5];h = animatedline('Marker', '.', 'LineStyle', 'none', 'Color', [1 0.75 0.8]);axis([-3 3 0 10])axis offstop = uicontrol('style','toggle','string','stop', ...'background','black','ForegroundColor','white');drawnowp  = [ .85  .92  .99  1.00];A1 = [ .85  .04; -.04  .85];  b1 = [0; 1.6];A2 = [ .20 -.26;  .23  .22];  b2 = [0; 1.6];A3 = [-.15  .28;  .26  .24];  b3 = [0; .44];A4 = [  0    0 ;   0   .16];cnt = 1;ticwhile ~get(stop,'value')r = rand;if r < p(1)x = A1*x + b1;elseif r < p(2)x = A2*x + b2;elseif r < p(3)x = A3*x + b3;elsex = A4*x;endaddpoints(h, x(1), x(2));drawnowcnt = cnt + 1;endt = toc;s = sprintf('%8.0f points in %6.3f seconds',cnt,t);text(-1.5,-0.5,s,'fontweight','bold','Color','red');set(stop,'style','pushbutton','string','close','callback','close(gcf)')
end


2 旋转蕨型叶图

%修改坐标
addpoints(h, x(2), x(1));%修改标注位置
s = sprintf('%8.0f points in %6.3f seconds',cnt,t);
text(2.5,-2.9,s,'fontweight','bold','Color','red');


3 枝干

A4 = [0, 0; 0, 0.16];
%修改为
A4 = [0, 0; 0, 0.08];
%这将使得蕨型叶的枝干更加瘦长

蕨型叶的起始点均为(0,0)。


4 塞平斯基三角形

function sierpinski_triangle_ashgclf resetset(gcf, 'color', 'white', 'menubar', 'none', ...'numbertitle', 'off', 'name', 'Fractal Sierpinski Triangle')x = [.5; sqrt(3)/6];h = animatedline('Marker', '.', 'LineStyle', 'none', 'Color', [0 2/3 0]);axis([0 1 0 sqrt(3)/2])axis offstop = uicontrol('style', 'toggle', 'string', 'stop', ...'background', 'white');hold onplot([0, 1, 0.5, 0], [0, 0, sqrt(3)/2, 0], 'k-*'); % 绘制三角形的顶点drawnowA1 = [0.5, 0; 0, 0.5];  b1 = [0; 0];A2 = [0.5, 0; 0, 0.5];  b2 = [0.5; 0];A3 = [0.5, 0; 0, 0.5];  b3 = [0.25; sqrt(3)/4];cnt = 1;ticwhile ~get(stop, 'value')r = rand;if r <= 1/3x = A1 * x + b1;elseif r <= 2/3 & r>1/3x = A2 * x + b2;elsex = A3 * x + b3;endaddpoints(h, x(1), x(2));drawnowcnt = cnt + 1;endt = toc;s = sprintf('%8.0f points in %6.3f seconds', cnt, t);text(0.25, -0.05, s, 'fontweight', 'bold');set(stop, 'style', 'pushbutton', 'string', 'close', 'callback', 'close(gcf)')
end

http://www.hengruixuexiao.com/news/21170.html

相关文章:

  • web网站开发基本流程有哪些济南百度seo
  • 南充建网站嘉兴百度seo
  • 哪个公司做视频网站怎么提高百度搜索排名
  • 企业网站建设中在方案设计上东莞网站推广的公司
  • emlog做企业网站seoheuni
  • 取名网站怎么做b2b平台有哪些网站
  • 太原网站建设开发公司英文seo推广
  • 郑州免费网站制作商旅平台app下载
  • 怎样做关键词网站百度seo查询系统
  • 有做翻译英文网站网推公司
  • 银行网站开发优质的seo快速排名优化
  • 爱是做的电影网站吗品牌营销案例分析
  • 广州seo网站排名优化视频app推广
  • 合肥网站设计公广州代运营公司有哪些
  • 佛山中小企业网站制作厦门网站建设平台
  • 外国人做僾视频网站网络营销成功案例有哪些2022
  • 租用大型服务器多少钱sem和seo有什么区别
  • 电话销售企业网站怎么做合肥百度搜索优化
  • 益保网做推广网站吗seo哪里有培训
  • wordpress缓存与手机版动态切换刷关键词排名seo
  • 哪个网站有做视频转场的素材2020年度关键词有哪些
  • 网站子页面怎么做的如何做好一个营销方案
  • 自己做的网站如何让别人访问seo服务销售招聘
  • 股票网站怎么做动态表格四川seo推广方案
  • 域名申请好了怎么做网站怎么有自己的网站
  • 做网站的工作叫什么网络营销的主要手段和策略
  • 服装网站怎么做白杨seo课程
  • 免费ppt模板哪里下载seo销售好做吗
  • 什么网站做推广农产品比较好活动推广宣传方案
  • 外贸网站开发哪家好网站免费推广软件