matlab 的动画程序 保存为gifx = linspace(-2,2,100);[X,Y,Z] = meshgrid(x,x,x);I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;p = patch(isosurface(X,Y,Z,I1,0));set(p,'FaceColor','red','EdgeColor','none');view(3);axis equal ;axis off;l

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/28 11:39:17
matlab 的动画程序 保存为gifx = linspace(-2,2,100);[X,Y,Z] = meshgrid(x,x,x);I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;p = patch(isosurface(X,Y,Z,I1,0));set(p,'FaceColor','red','EdgeColor','none');view(3);axis equal ;axis off;l
xU[OF+#Ԭ/CP%/cPKy iѠ( AjPDU ͟wx!$!},Ysn3|s;Sq4 6vJDϿ]{64p18QXjkpk؆a,rc+"V2umm$&lzu,1TFR'b@_-^8Xɑ ,\y.{rM״s빰̪"TYU[D!75еgY3O jHyp!8D("tH`"V)]X@n??D[Q/{w@ yƶbwIwpF 9f,8m7>X<%zbӢ3ZG|cChh6 ͢0mEI 9!r0 2=KF*7Tn6Y@bg9&`Z kWoBiczYf,'xnێh;wg[wxcm:|`s%^Zx/={ŻOGIkݨR-ěmVp_pWSa m`8ZNOncy1=t/yIEk).d26';$N~V/up4ה!iC?T)CLO| E(< OS%`!{>RbƁ1)p*V0]Z j~;$(q}3aA>KN%c=A|bΓ>KڎC?D_CKh_ 

matlab 的动画程序 保存为gifx = linspace(-2,2,100);[X,Y,Z] = meshgrid(x,x,x);I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;p = patch(isosurface(X,Y,Z,I1,0));set(p,'FaceColor','red','EdgeColor','none');view(3);axis equal ;axis off;l
matlab 的动画程序 保存为gif
x = linspace(-2,2,100);
[X,Y,Z] = meshgrid(x,x,x);
I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;
p = patch(isosurface(X,Y,Z,I1,0));
set(p,'FaceColor','red','EdgeColor','none');
view(3);
axis equal ;
axis off;
light('Posi',[0 -2 3]); % 在(0,-2,3)点处建立一个光源
lighting phong
set(gca,'nextplot','replacechildren');
% 记录电影
XX = get(p,'XData');
YY = get(p,'YData');
ZZ = get(p,'ZData');
for j = 1:20
bili = sin(pi*j/20);
set(p,'XData',bili*XX,'YData',bili*YY,'ZData',bili*ZZ)
F(j) = getframe;
end
% 放映10次
movie(F,10)
如何将以上程序编的动画 保存为gif格式?

matlab 的动画程序 保存为gifx = linspace(-2,2,100);[X,Y,Z] = meshgrid(x,x,x);I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;p = patch(isosurface(X,Y,Z,I1,0));set(p,'FaceColor','red','EdgeColor','none');view(3);axis equal ;axis off;l

lz ,不知道你还需要不,看到你需要,刚好,我也想知道,就给你试了下.效果还不错

 

 

代码如下:

clc ;clear
x = linspace(-2,2,100);
[X,Y,Z] = meshgrid(x,x,x);
I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;
p = patch(isosurface(X,Y,Z,I1,0));
set(p, 'FaceColor', 'red', 'EdgeColor', 'none');
view(3);
axis equal ;
axis off;
light('Posi',[0 -2 3]); % 在(0,-2,3)点处建立一个光源
lighting phong
set(gca,'nextplot','replacechildren');
% 记录电影
XX = get(p,'XData');
YY = get(p,'YData');
ZZ = get(p,'ZData');
% figure(1)
filename = 'hongxing1.gif';%保存的动画名
for j = 1:20
bili = sin(pi*j/20);
set(p,'XData',bili*XX,'YData',bili*YY,'ZData',bili*ZZ)
F(j) = getframe;
%制作gif主要代码
drawnow
frame = getframe(gcf);
im = frame2im(frame);
[imind,cm] = rgb2ind(im,256);
if j == 1;
imwrite(imind,cm,filename,'gif', 'Loopcount',inf,'DelayTime',0.1);
else
imwrite(imind,cm,filename,'gif','WriteMode','append','DelayTime',0.1);
end
%
end
% 放映10次
figure
movie(F,10)


 

matlab 的动画程序 保存为gifx = linspace(-2,2,100);[X,Y,Z] = meshgrid(x,x,x);I1 = (X.^2+9/4*Y.^2+Z.^2-1).^3-X.^2.*Z.^3-9/80*Y.^2.*Z.^3;p = patch(isosurface(X,Y,Z,I1,0));set(p,'FaceColor','red','EdgeColor','none');view(3);axis equal ;axis off;l Matlab怎样保存动画? matlab牛顿迭代动画演示求一个程序,能用动画演示出牛顿迭代,必须是要用matlab写的, 求下题的MATLAB程序 最小二乘法的matlab程序 求下式的Matlab程序 高斯列主元消元法的matlab程序 几何画板中生成的动画如何保存? matlab中如何保存运行程序时出现的动画?n=100;m=3;v=2;x=0;u=3*v*[sech(sqrt(v).*(x)./v)].^2;h=plot(x,u);axis([-10 10 -2 10])set(h,'EraseMode','Xor' );for l=1:mfor k=-300:nx=-10:0.01:20;t=k/n;u=3*v*[sech(sqrt(v).*(x-v.*t)./v)].^2;set(h,'XDa 运行matlab程序时提示Image is too big to fit on screen; displaying at 56% scale.怎么办?如何将这幅图像100%的原图保存成bmp格式?我试着保存都是保存了56%大小的样子. simpson公式的matlab程序 kruskal算法的Matlab程序 surf算法的matlab程序, 什么是赛璐珞片动画?赛璐珞片动画的制作程序有是怎么? matlab动画仿真就是范围在.1-1之间的波动动画 matlab怎样模拟一个物体从高空掉落的动画? Matlab中使用fsolve函数解方程,我几乎照搬课本上的例子敲了下面的程序:但一直提示错误.程序:function F = myfunn(x)F = [2*x(1)-x(2)-exp(-x(1));-x(1)+2*x(2)-exp(-x(2))];然后保存为myfunn.m文件,然后又建了一 Matlab:试编写函数式文件程序返回该函数并保存