Rank: 465682 based on 0 downloads (last 30 days) and 0 file submitted
photo

Mark

E-mail

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Mark
Updated File Comments Rating
10 Mar 2010 saveppt This function saves Matlab figure windows or Simulink models to a Powerpoint file. Author: Mark Brown

Here is a quick example of how I use pushbutton 1 to generate the plot and using the saveppt in pushbutton 2.

% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
figure
x = -pi:pi/10:pi;
y = tan(sin(x)) - sin(tan(x));
plot(x,y,'--rs','LineWidth',2,...
'MarkerEdgeColor','k',...
'MarkerFaceColor','g',...
'MarkerSize',10)

% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Establish valid file name:
saveppt

I just can't see how the code below would capture the current figure. Need some help to allow me to embed this into my GUI.

% Capture current figure/model into clipboard:
if nargin<3
print -dmeta
else
print('-dmeta',prnopt)
end

Contact us