MATH/CMSC 206 - Introduction to Matlab

Announcements Syllabus Tutorial Projects Submitting

Answers to Self-Test

1. The following m-file should work:

%% My Matlab Example
% This is an example for students to try.
%% Section 1 -- Calculations
% Here is a derivative:
syms x
diff(3 * log(x) + x^2)
%% Section 2 -- Numbering
% Here are three numbered lines:
%%
% # Line 1
% # Line 2
% # Line 3
%% Section 3 -- HTML
% Just a short example using colors:
%%
% <html>
% <font color = "red"> RED </font>
% <font color = "green"> GREEN </font>
% <font color = "blue"> BLUE </font>
% </html>