Animation video from data points, giving error below
Mostrar comentarios más antiguos
Hi,
I am making the the animation from the data points. but I am gettig the error below, can anyone help me come over this error. Also if anyone can help me recording this data like 1 point for 1 fps that be great. Below is the error and the code I am using.
Error:
Error using VideoWriter/writeVideo (line 414)
Requested 968x1902x3x2184 (11.2GB) array exceeds maximum array size preference. Creation of
arrays greater than this limit may take a long time and cause MATLAB to become
unresponsive.
Error in graphanimation (line 28)
writeVideo(video,F);
Code:
close all; clear all; clc;
%plotting the graph animation
a=readmatrix('pressure_experiement.ods');
x=a(:,7);
y=a(:,11);
curve = animatedline('color','b','Marker','x');
set(gca,'XLim',[0 500],'YLim',[0 90]);
grid on;
title('CircleSide_Awaypoint');
xlabel('Head (mm)');
ylabel('Pressure (mmH2o)');
set(gcf,'Units','normalized','OuterPosition',[0 0 1 1]);
for i=1:length(x)
addpoints(curve,x(i),y(i));
drawnow
F(i)=getframe(gcf)
%pause(0.5)
end
hold all
video = VideoWriter ('away.avi','MPEG-4')
video.FrameRate = 1;
open(video)
writeVideo(video,F);
close(video)
Respuesta aceptada
Más respuestas (1)
muhammad choudhry
el 3 de Sept. de 2021
0 votos
Categorías
Más información sobre Animation en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!