早教吧 育儿知识 作业答案 考试题库 百科 知识分享

matlab,在同一坐标轴中绘制下列两条曲线并用*标注两曲线的交点.(1)y=2x-0.5(2)x=sin(3t)cos(t),y=sin(3t)sin(t),0<=t<=pi.

题目详情
matlab,在同一坐标轴中绘制下列两条曲线并用*标注两曲线的交点.
(1)y=2x-0.5 (2) x=sin(3t)cos(t),y=sin(3t)sin(t),0<=t<=pi.
▼优质解答
答案和解析
t=-1:0.01:3;x1=t;y1=2*x1-0.5;x2=sin(3*t).*cos(t);y2=sin(3*t).*sin(t);plot( x1,y1,x2,y2) % 绘制两条曲线hold ons=solve('y=2*x-0.5','x=sin(3*t)*cos(t)','y=sin(3*t)*sin(t)'); % 求交点plot( double(s.x) , double(s.y) ,'*'); % 用*标注两曲线的交点axis([-1,1.5,-2,1])这是2010a运行的效果: