> 其他 >
用matlab求平面x/3+y/4+z/5=1和柱面x^2+y^2=1的交线上到平面xoy最短的点
人气:472 ℃ 时间:2020-03-27 17:01:11
解答
首先根据后面的方程 令 x = cos(theta) ,y = sin(theta),这样就简单多了,具体代码如下
[theta z] = fminbnd(@(theta) 5*(1-cos(theta)/3-sin(theta)/4),0,2*pi);
x = cos(theta);
y = sin(theta);
disp(['最近点的值 z = ',num2str(z),' 坐标(x,y) = (',num2str(x),',',num2str(y),')'])
推荐
猜你喜欢
© 2025 79432.Com All Rights Reserved.
电脑版|手机版