mathematica manipulate命令使用使用小弟初学mathematica,有些问题想请教下大哥大姐们.x =.; y =.x1 = 2; y1 = 0;x2 = 0; y2 = -1;ob = Graphics[Line[{{x1,y1},{x2,y2 - a}}],Axes -> True] /.a -> 1;eq1 = (y - y1)/(x - x1) == (y - y2 + a)/

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/14 21:30:26
mathematica manipulate命令使用使用小弟初学mathematica,有些问题想请教下大哥大姐们.x =.; y =.x1 = 2; y1 = 0;x2 = 0; y2 = -1;ob = Graphics[Line[{{x1,y1},{x2,y2 - a}}],Axes -> True] /.a -> 1;eq1 = (y - y1)/(x - x1) == (y - y2 + a)/
xS[OA+(qd]|I&&Ma4H­v7zET)* Fk-ɿ3*Mؗ9|;gsvplQ÷K~>HI[Yګm|{XytÓ[4lHmZ;4GgvE;NE=T%y_EpxѷeO">Mj`jX?$1~+~BVaik7ųqw[(S+&’s!2t  yHMxG8>[2"oM"VɅ&h&2z22 )cq-{BhYZ3(ݬ;E~@ eXi zLM/e-aXM 0!} veXGI_@HXk~=ZDq _*%.1v/WtEFy+- zBBh͎ KYF{YLeuErZ 7Aں ڮ~~ZMtv4o 7#C| M(]!=ah8 DnV2q4Sa3^$D}e %F8

mathematica manipulate命令使用使用小弟初学mathematica,有些问题想请教下大哥大姐们.x =.; y =.x1 = 2; y1 = 0;x2 = 0; y2 = -1;ob = Graphics[Line[{{x1,y1},{x2,y2 - a}}],Axes -> True] /.a -> 1;eq1 = (y - y1)/(x - x1) == (y - y2 + a)/
mathematica manipulate命令使用使用
小弟初学mathematica,有些问题想请教下大哥大姐们.
x =.; y =.
x1 = 2; y1 = 0;
x2 = 0; y2 = -1;
ob = Graphics[Line[{{x1,y1},{x2,y2 - a}}],Axes -> True] /.
a -> 1;
eq1 = (y - y1)/(x - x1) == (y - y2 + a)/(x - x2) /.a -> 1;
x3 = (x1 + x2)/2;
eq2 = x == x3;
temp1 = x /.Solve[{eq1,eq2},{x,y}];
temp2 = y /.Solve[{eq1,eq2},{x,y}];
ve = ContourPlot[x == x3,{x,0,2},{y,temp2,0},Frame -> False,
Axes -> True];
Show[ob,ve]
写了几行代码,运行后是这样的
(抱歉,
现在想改变a的值,然后垂直线也随着斜线的改变而改变
Manipulate[Show[ob,ve],{a,0,1}]

mathematica manipulate命令使用使用小弟初学mathematica,有些问题想请教下大哥大姐们.x =.; y =.x1 = 2; y1 = 0;x2 = 0; y2 = -1;ob = Graphics[Line[{{x1,y1},{x2,y2 - a}}],Axes -> True] /.a -> 1;eq1 = (y - y1)/(x - x1) == (y - y2 + a)/
你犯了两点错误:一是Manipulate[Show[ob,ve],{a,0,1}]的话Mathematica会把此式子中的a作为局部变量,外部的a就不算数了;二是你用了两个 /.a -> 1,这是把式子中的a全部换成1,并没有真的给a赋了值,无论a原本是什么值都与其无关.