Function Reference: Volume 2 (F-O) - The MathWorks - #1351

/ 1568


catalogue search
P. 1351
P. 1352
P. 1353
P. 1354
P. 1355
P. 1356
P. 1357
P. 1358
P. 1359
P. 1360
P. 1361
P. 1362
P. 1363
P. 1364
P. 1365
P. 1366
P. 1367
P. 1368
P. 1369
P. 1370
P. 1371
P. 1372
P. 1373
P. 1374
P. 1375
P. 1376
P. 1377
P. 1378
P. 1379
P. 1380
P. 1381
P. 1382
P. 1383
P. 1384
P. 1385
P. 1386
P. 1387
P. 1388
P. 1389
P. 1390
P. 1391
P. 1392
P. 1393
P. 1394
P. 1395
P. 1396
P. 1397
P. 1398
P. 1399
P. 1400


See other catalogues for The MathWorks

Text version of the page
movie
s = subplot(2,1,2) Z = peaks; surf(Z); axis tight
set(gca,'nextplot','replacechildren'); % Record the movie for j = 1:20 axes(r)
surf(sin(2*pi*j/20)*Z,Z)
axes(s)
surf(sin(2*pi*(j+5)/20)*Z,Z)
F(j) = getframe(gcf); pause(.0333) end
% Play the movie; note that it does not fit the figure properly:
h2 = figure;
movie(F,10)
% Use the figure handle to make the frames fit: movie(h2,F,10)
Example 3: With larger frames, first adjust the figure's size to fit the movie:
figure('position',[100 100 850 600]) Z = peaks; surf(Z); axis tight
set(gca,'nextplot','replacechildren'); % Record the movie
for j = 1:20
surf(sin(2*pi*j/20)*Z,Z) F(j) = getframe; end
[h, w, p] = size(F(1).cdata); % use 1st frame to get dimensions hf = figure;
% resize figure based on frame's w x h, and place at (150, 150) set(hf, 'position', [150 150 w h]); axis off
% tell movie command to place frames at bottom left
2-2295

pageCatalog pdf di En 2012-06-22-01