MATLAB: Save the Figures Getting From ANFIS designer

anfis designer

how to save the Memebership function figure in Matlab??Is there another option to save the figure?Because after plotting the memebership function, there is no option for save figure.

Best Answer

In the Membership Function Editor, Click on File > Export > To Workspace. Provide the workspace variable name (e.g. yourMemFis) and click on OK.
Then in the command window, execute the below code
% Plot membership functions for the first input variable
plotmf(yourMemFis, 'input', 1)
% Export the plot in PNG format

exportgraphics(gcf, 'inputMemFunction.png')
% Close current figure

close(gcf)
% Plot membership functions for the first output variable
plotmf(yourMemFis, 'output', 1)
% Export the plot in PNG format
exportgraphics(gcf, 'outputMemFunction.png')
% Close current figure
close(gcf)
% so on..
Related Question