MATLAB Answers

Recreate Matlab figure in Excel?

9 views (last 30 days)
Max Viklund
Max Viklund on 20 Jan 2020
Answered: Allen on 20 Jan 2020
I am looking for a way to efficiently convert Matlab plots to Excel plots, while preserving markers, colors, errorbars, etc.
I want to do this so that I can then export the Excel graph to Powerpoint and be able to animate it. Therefore I don't want to just paste a picture of the Matlab plot in an Excel sheet, I need it as an actual interactive plot in Excel.
I have tried to export the Matlab figure as a .emf file, and tried ungrouping it in Powerpoint, but it then ungroups the markers from the lines, and manually regrouping that would be a nightmare.
Very thankful for tips.

  0 Comments

Sign in to comment.

Answers (1)

Allen
Allen on 20 Jan 2020
You can always use ActiveX (this will be phased out in a future version of MATLAB) to build plots directly in your Excel file. However, this can be difficult to program and slow to execute. Since you are ultimately trying to import a video into Powerpoint, you might want to try considering using VideoWriter() and getframe() to capture plots as frames (images) and compiliing them into an AVI using writeVideo().
v = VideoWriter(filename,'Motion JPEG AVI');
for i=1:Number_of_Frames
plot(X,Y)
frame = getframe(gcf);
writeVideo(v,frame)
end

  0 Comments

Sign in to comment.

Products


Release

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by