How to make visible or great MATLAB SIMULINK Figures into MS Word or PPT

Поділитися
Вставка
  • Опубліковано 3 жов 2024
  • This is very useful to the students of Undergraduate, postgraduate, and research scholars
    This problem we face while exporting/ or copying figures from MATLAB SIMULINK model to MS Word document or PowerPoint presentation i.e. while writing thesis documentation or a paper or a report.
    Generally, We follow different methods
    Take ‘a screenshot’ of the plot and paste it into the MS Word or PPT and Crop it.
    Invert the color of the plot using a paint application, if it is in dark window.
    Copy to Clipboard (Ctl+C) from File and paste it the MS Word or PPT
    By using the ‘Plot command’ in the MATLAB command window
    By using Axes Properties from the Edit tab - Time-consuming
    By using customized MATLAB code for the SIMULINK model and saving the figure in .png form.
    If you have any doubts from this topic or in genral MATLAB, write your query in the comments section and I will reply to you as soon as possible.
    You can also watch other interesting topics like subplots, custom plots, and etc. by visiting / @edxcell
    MATLAB Subplots
    • MATLAB Subplots
    Multiple Graphs Or Plot Overlays in same MATLAB Plot
    • Multiple Graphs Or Plo...
    How to use Symbols Greek Characters in Matlab Plot
    • How to use Symbols Gre...
    Formating of Matlab Plot Using Commands
    • Formating of Matlab Pl...
    Thank you for watching, if you feel interested, please subscribe to this channel, give comments and share it with your friends.
    % MATLAB CODE: Plots from Simulink Model to Word or PPT, Source by Edxcell %
    clc
    clear all
    close all
    figure(1)
    open('simfig1.slx');% Change to your model in place of simfig1
    sim('simfig1.slx');% Simulating
    % Variables saved in 'ans' file and access them as folllows
    plot(ans.tsim,ans.inp1,'r:', ans.tsim,ans.out1,'b','LineWidth',1.5)
    % You can use default variable tout directly in place of tsim
    %plot(ans.tout,ans.inp1,'r:', ans.tout,ans.out1,'b','LineWidth',1.5)
    title('Response of the 2^{nd} order system for a unit step','FontSize',12)
    xlabel('t: Time(sec)','FontSize',12,'FontWeight','bold','Color','k')
    ylabel('y(t): Output','FontSize',12,'FontWeight','bold','Color','r')
    legend('r(t):Step Input', 'Ys):Output','FontSize',12)
    text(3.07,1.5, 't_{p2}: Second Peak','FontSize',12)
    text(15,1.1, 't_s: Settling time','FontSize',12)
    grid on
    %Saving figure automatically in .png form after simulation.
    saveas(gcf,'Fig1.png')% Can use more saveas if you have many figures.
    Have a good time friends…

КОМЕНТАРІ •