matlab的一个隐函数的画图出现错误,x=-5:0.1:5;y=5:0.1:5;z=-5:0.1:5; [x,y,z]=meshgrid(x,y,z); f=((x^2+(9/4)y^2+z^2-1)^3-x^2z^3-(9/80)y^2z^3); p=patch(isosurface(x,y,z,f,0)); set(p,'FaceColor','red','EdgeColor','none'); daspect([1 1 1])vie

来源:学生作业帮助网 编辑:作业帮 时间:2024/04/28 16:24:22

matlab的一个隐函数的画图出现错误,x=-5:0.1:5;y=5:0.1:5;z=-5:0.1:5; [x,y,z]=meshgrid(x,y,z); f=((x^2+(9/4)y^2+z^2-1)^3-x^2z^3-(9/80)y^2z^3); p=patch(isosurface(x,y,z,f,0)); set(p,'FaceColor','red','EdgeColor','none'); daspect([1 1 1])vie
matlab的一个隐函数的画图出现错误,
x=-5:0.1:5;y=5:0.1:5;z=-5:0.1:5;
[x,y,z]=meshgrid(x,y,z);
f=((x^2+(9/4)y^2+z^2-1)^3-x^2z^3-(9/80)y^2z^3);
p=patch(isosurface(x,y,z,f,0));
set(p,'FaceColor','red','EdgeColor','none');
daspect([1 1 1])
view(3)
camlight; lighting phong
总是出现:
f=((x^2+(9/4)y^2+z^2-1)^3-x^2z^3-(9/80)y^2z^3);
|
Error:Missing variable or function.

matlab的一个隐函数的画图出现错误,x=-5:0.1:5;y=5:0.1:5;z=-5:0.1:5; [x,y,z]=meshgrid(x,y,z); f=((x^2+(9/4)y^2+z^2-1)^3-x^2z^3-(9/80)y^2z^3); p=patch(isosurface(x,y,z,f,0)); set(p,'FaceColor','red','EdgeColor','none'); daspect([1 1 1])vie

I did this before, so just give you the codes I wrote, try this:

(you should use .^, .* and ./ instead of ^, * and / because you want to do operations on every element, not the matrix or vector.

%%This file creates a 3-d red heart with an equation

[x,y,z]=meshgrid(linspace(-3,3,120));

f=(x.^2+(9*y.^2)./4+z.^2-1).^3-((9*y.^2).*(z.^3))./80-(x.^2).*(z.^3);

p=patch(isosurface(x,y,z,f,0));

set(p,'FaceColor','r')

grid on

daspect([1 1 1])

view(3)

camlight('right')

camlight('left')

camlight('headlight')

lighting phong

xlabel('X')

ylabel('Y')

zlabel('Z')

title('Heart of Math')

matlab画图时的坐标出现错误? matlab中用plot画图出现下面错误 我想画三个函数的图,可是第一个函数定义就出了问题>> x=[0:1:20];>> y1=100/(1+19*exp((-0.4)*x));Error using ==> mrdivideMatrix dimensions must agree. matlab 画图的问题, matlab的一个隐函数的画图出现错误,x=-5:0.1:5;y=5:0.1:5;z=-5:0.1:5; [x,y,z]=meshgrid(x,y,z); f=((x^2+(9/4)y^2+z^2-1)^3-x^2z^3-(9/80)y^2z^3); p=patch(isosurface(x,y,z,f,0)); set(p,'FaceColor','red','EdgeColor','none'); daspect([1 1 1])vie 隐函数画图 matlab请问下怎样才能将('(1-sqrt((18960-((60-L*sino)+11*sin0.7854)^2)-(L^2)*(1-coso)^2)/121)-cos0.7854')=0;中o(角度)与L的关系求出来挖.总是出现错误Error using ==> charCell elements must be character arrays matlab画图题绘制该函数的曲线 matlab step的作用是不是就是在原函数的基础上除以一个s然后画图啊matlab step函数的作用是不是就是在原函数的基础上除以一个s然后画图啊 Matlab中如何定义一个函数文件,来求给定复数的指数、对数、正弦和余弦,并在命令文件中调用该函数文件出现这样的错误?Undefined command/function 'unction'. matlab 省略号 出现错误 采用窗函数法设计一个FIR数字低通滤波器,在MATLAB里输入程序hd=ideal_lp(Wc,N)时,出现错误采用窗函数法设计一个FIR数字低通滤波器,在MATLAB里输入程序hd=ideal_lp(Wc,N)时,会出现这样的语句.Undefined com matlab 提示错误是:Error using ==> plot Vectors must be the same lengths.请问怎么解决,代码如下就是一个分段函数画图的问题(菜鸟一个,希望能有比较简单的解决方法,尽量别用太高端的函数)y=[];x=-6:0. Matlab拟合工具箱自定义函数中 中输入y=L./(1+a*exp(-bt))出现错误,要拟合的函数是 泊松曲线,该怎么输入 请高手解释一下matlab三维图形的画图问题想画一个函数的三维图形z=x^2*(1-x-y)然后写程序为:[x y]=meshgrid(0:.01:1,0:.01:1);>> z=x.^2*(1-x-y);>> mesh(x,y,z)画出来的就是上图的平面,明显错误!把函数的乘法 matlab 三次方 作图 提示错误 函数是y=(x^3-3*x)^(1/3) 还有一个y=arctan((x^2+x+1)/(x^2-x-2))的图像!我使用matlab的时候,syms x y; y=(x^3-3*x)^(1/3); x=-10:1:10 ; plot(x,y);然后会出现错误 matlab的画图函数y+sin(x^2),画出关于x的y的图象. 这个函数用matlab画图, 一道简单的matlab画图题 . matlab surf函数画图用surf做出该公式的图形,急求