数学方程MATLAB [英] math equation MATLAB
本文介绍了数学方程MATLAB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在不使用matlab内置函数的情况下创建Cone?
解决方案
这里是,
一个圆的代码然后通过将z更改为圆高并将r更改为半径我可以创建一个圆锥(至少类似于它)。
r = 1
teta = -pi:0.01:pi
x = r * cos(teta);
y = r * sin(teta);
z =零( 1 ,numel(x));
plot3(x,y,z);
持有
%--------------------- --------------%
for i = 1 : 20
z = z + 0.05;
r = r-0.05;
x = r * cos(teta);
y = r * sin(teta);
plot3(x,y,z);
持有
end
hold 关跨度>
Hi,
how can i create a Cone without using matlab builtin function?
解决方案
here it is,
code of a circle then by changing the z as the circle height and changing the r as its radius i can create a cone( at least something like it ).
r=1 teta=-pi:0.01:pi x=r*cos(teta); y=r*sin(teta); z=zeros(1,numel(x)); plot3(x,y,z); hold on % ----------------------------------- % for i = 1 : 20 z=z+0.05; r=r-0.05; x=r*cos(teta); y=r*sin(teta); plot3(x,y,z); hold on end hold off
这篇关于数学方程MATLAB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文