matlab画星形线的程序
答:t=-2*pi:0.1:2*pi;x=cos(t).^3;y=sin(t).^3;>> plot(x,y)>>
答:matlab里的动画和你的是有些区别的:clear all;clc;a=4;t=0:pi/150:2*pi;xx=4*cos(t);yy=4*sin(t);plot(xx,yy);hold on;for k=1:length(t)x=a*cos(t(k))^3;y=a*sin(t(k))^3;plot(x,y,'r.','Markersize',5);axis([-5,5,-5,5]);axis equal;w(:,k)=getfra...
答:星形线:clear all;clc;a=2;theta=0:pi/40:2*pi;x=a*cos(theta).^3;y=a*sin(theta).^3;plot(x,y);axis equal;--- 心形线:clear all;clc;ezplot('x^2+y^2+3*x-3*sqrt(x^2+y^2)');axis equal;或:clear all;clc;a=3;theta=0:pi/40:2*pi;r=a*(1-cos(theta));...
答:a=1;b=1;x=a*cos(t).^3;y=b*sin(t).^3;plot(x,y)%画图
答:做如下改动:(1)将x,y全用x(k),y(k)表示 (2)新生成变量tx,ty (3)用tx,ty画星形线 程序在附件 结果如下:
答:b 蓝色 * 星形线 w 白色 : 虚线 k 黑色 -.-- 点划线 matlab6.1线形:[ + | o | * | . | x | square | diamond | v | ^ | > | < | pentagram | hexagram ]square 正方形 diamond 菱形 pentagram 五角星 hexagram 六角星 ...
答:等等 后面的size就是其大小了,不知道值的话,可以画完图点编辑框上面的箭头,然后双击画的图,下面出现属性框,marker项后面的数字下拉菜单就是size,选择合适的大小,今后就用这个值就行 画图的命令是:plot([0,1,2,3,4],[0,2,5,6,9],'c-pentagram','markersize',30)运行程序结果如图:...
答:matlab6.1线形:[ + | o | * | . | x | square | diamond | v | ^ | > | < | pentagram | hexagram ]square 正方形 diamond 菱形 pentagram 五角星 hexagram 六角星 如果想控制每条线条的颜色就得分开画,比如说这样 plot(A(:,1),'r+',A(:,2),'b-',A(:,3),'...
答:matlab使用figure(1), figure(2)...可以作出多幅图。示例如下:1 theta=linspace(0,2*pi,400);2 rou=4*sin(2*theta);3 figure(1)4 polar(theta,rou);5 figure(2);6 ezplot('x^(2/3)+y^(2/3)-2^(2/3)')
答:1),figure(2)就是第一第二副图的意思。在建立图形的时候,您注意一下它的标题就是figure1或figure2等等,对应到程序中就是您的例子语句。2、figure用法 一般建立新图只需要一个figure就行,系统自动建立新图,可以简单一点,也可以自己添加。只要在plot后面写上figure即可,位置不需要特殊限制。
网友评论:
屈咸18037195199:
matlab x=2cos^3 y=2sin^3 蓝色虚线绘制星型线的图型
17076司肢
: theta=-pi:0.01:pi; %设置中间变量及步长 x=2*cos(theta).^3; %按给定关系列x表达式 y=2*sin(theta).^3; %按给定关系列y表达式 plot(x,y,'b--') %作关于X-Y图,“b”表示运用蓝色线,“--”表示做虚线
屈咸18037195199:
matlab画图 用蓝色虚线绘制星型线 x=2cos3(t) y=2sina3(t),在t=[0,2π]的图形 -
17076司肢
: t=0:0.1:2*pi; plot(t,2*cos(3*t),'--b',t,2*sin(3*t),'--b')
屈咸18037195199:
matlab编写一个脚本文件,画一个五角星. -
17076司肢
: 建立脚本文件star.m 2 编写程序代码 n=1:2:11; x=sin(0.4*n*pi); y=cos(0.4*n*pi); plot(x,y) 3 在命令窗口中输入star
屈咸18037195199:
matlab中这段代码有点不懂
17076司肢
: x,y分别为给出的向量; plot(x,y,'b*');意思是画出x为横坐标,y为纵坐标的蓝色星形线;
屈咸18037195199:
使用matlab编程:画出心形线和马鞍面 -
17076司肢
: 程序代码和图形如下: %1心形线 clc;clear;close all; i=-pi:0.1:pi; x=2.*(sin(i)-sin(2*i)./2); y=2.*(cos(i)-cos(i).^2); figure(1); plot(x,y);grid on;box on; axis([-3 3 -4.2 1]); title('心形线');xlabel('x');ylabel('y'); %2马鞍面 clc;clear; a=10; b=10; x=-1.5:0.1:1.5; ...
屈咸18037195199:
MATLAB编程:在同一平面的两个窗口分别画出心形线和马鞍面 -
17076司肢
: 你的问题确实很麻烦.%问题1. clear ax1=subplot(1,2,1); t=0:.01*pi:2*pi; f1=polar(t,1+cos(t)); title('心形线'); legend(f1,'r=1+cost')ax2=subplot(1,2,2); x1=linspace(-40,20,40); y1=linspace(-40,20,40); [xx1,yy1]=meshgrid(x1,y1); zz1=xx1.*yy1; f2=...
屈咸18037195199:
求matlab程序画一个3d五角星 -
17076司肢
: %五角星外五角圆半径定为1 rr=0.4; %五角星内五角圆半径 h=0.3; %五角星厚度 r=repmat([1;rr],[5 1]); r=[r;1]; d=(0:36:360)'+18; x=r.*cosd(d); y=r.*sind(d); z=ones(size(x)); o=zeros(size(x)); X=[o x]; Y=[o y]; Z1=[h*z o]; Z2=[-h*z o]; C=ones(size(X)); ...
屈咸18037195199:
如何用matlab 7.0画出心形线? -
17076司肢
: 使用下面程序就可以: ezpolar('1/2*(1+cos(t))')
屈咸18037195199:
如何用matlab画出x^(2/3)+y^(2/3)=a^(2/3)的图像 -
17076司肢
: ezplot('x^(2/3)+y^(2/3)-1^(2/3)') %a=1 ezplot('x^(2/3)+y^(2/3)-2^(2/3)') %a=2 ……
屈咸18037195199:
怎么用Matlab画星座图? -
17076司肢
: 看看这个程序是否符合你的要求:按下鼠标左键开始绘制一个星座图,点击右键结束当前星座 function xingzuo figure('WindowButtonDownFcn',@wbdcb) ah = axes('DrawMode','fast'); axis ([1 10 1 10]) title('绘制星座图') color1='brcmkgy'; num=1...