matlab中画带有参数曲线方程,matlab参数方程画曲线

求x2 - 3x +1 = 0

x = -5:0.1:5;

y1 = x.x-3x+1;

y2=zeros(size(x));

plot(x,y1,x,y2);

210879011_1_2020122311564268

f = @(x) xx-3x+1

x1=fzero(f,0.5)

x2 = fzero(f,2.5)

x = [0.2,1.8,2.5]

y = [1.3,2.8,1.1]

z = [0.4,1.2,1.6]

plot3(x,y,z)

grid on

axis([0,3,1,3,0,2])

210879011_2_20201223115642194

210879011_3_20201223115642302

t = linspace(0,10*pi,200) %生成有200个元素的向量t

x = sin(t) + t.*cos(t)

y = cos(t)-t.*sin(t)

z = t

subplot(1,2,1)

plot3(x,y,z)

grid on

subplot(1,2,2)

plot3(x(1:4:200),y(1:4:200),z(1:4:200))

grid on

210879011_4_20201223115642506

210879011_5_20201223115642662

210879011_6_20201223115642771

210879011_7_20201223115642896

210879011_8_202012231156436

210879011_9_20201223115643130

210879011_10_20201223115643240

210879011_11_20201223115643521

210879011_12_20201223115643662

plot(cos(0:pi/20:2*pi))

210879011_13_20201223115643771

210879011_14_20201223115643943

O表示圆 r表示红色

210879011_15_20201223115644271

210879011_16_20201223115644459

210879011_17_20201223115644677

210879011_18_20201223115644959

210879011_19_20201223115645240

210879011_20_20201223115645521

210879011_21_20201223115645818

t = linspace(1,2)

f = t.t

g = sin(2pi.*t)

plot(t,f,‘b’,t,g,‘or’)

xlabel(‘Time (ms)’)

ylabel(‘f(t)’)

title(‘Mini Assignment #1’)

legend(‘t^{2}’,‘sin(2\pi t)’)


本文来自互联网用户投稿,文章观点仅代表作者本人,不代表本站立场,不承担相关法律责任。如若转载,请注明出处。 如若内容造成侵权/违法违规/事实不符,请点击【内容举报】进行投诉反馈!

相关文章

立即
投稿

微信公众账号

微信扫一扫加关注

返回
顶部