Plot animation with Struct. Variables
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Lawson Hoover
el 8 de Dic. de 2012
Comentada: Lauren
el 13 de Dic. de 2013
I was trying to turn this sequence for a single plot into a movie. Beam.x and Beam.y is a 100 spot vector. My original code is:
plot(x,y,'--r','LineWidth',3); % This is the original position of the Beam
hold on % Holds only the axes values
line(Beam.x,Beam.y,'color','b','linewidth',2); % The New position of Beam
xlabel('Beam Length (in.)','Color','g');
ylabel(bstr,'Color','g');
ylim([-(Beam.y(10)) max(Beam.y)]);
legend('Without Deflection','With Deflection');
title(astr,'Color','y','fontweight','b');
set(S.ax,'YDir','reverse');
set(S.ax,'XGrid','on');
set(S.ax,'YGrid','on');
hold off
Anytime I try to turn it into a movie or anything of the sort I get the error:
The following error occurred converting from struct to double:
Error using double
Conversion to double from struct is not possible.
OR:
Error using capturescreen
Figure destroyed during getframe
Error in getframe (line 103)
x=builtin('capturescreen', varargin{:});
Any ideas?
2 comentarios
Walter Roberson
el 8 de Dic. de 2012
Which line of code shows the problem about converting struct to double? How are you trying to turn it into a movie?
Respuesta aceptada
Lawson Hoover
el 8 de Dic. de 2012
1 comentario
Lauren
el 13 de Dic. de 2013
Can you please share? I am having the same problem. How did you get it to work?
Más respuestas (0)
Ver también
Categorías
Más información sobre Animation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!