MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1
1 Create a subfolder called html in your current folder.
2 Create surfpeaks.jpg by running this code in the Command Window.

saveas(surf(peaks),'html/surfpeaks.jpg');
3 Publish this MATLAB code to HTML.

%% Image Example
% This is a graphic:
%
% <<surfpeaks.jpg>>
%

Valid Image Types for Output File Formats

The type of images you can include when you publish depends on the output type of that
document as indicated in this table. For greatest compatibility, best practice is to use the
default image format for each output type.

23 Presenting MATLAB Code

Free download pdf