Lesson 1 The MATLAB Environment
clear
clc
plot
x_coordinates = [1,3,10];
y_coordinates = [2,4.2,12.3];
plot(x_coordinates,y_coordinates);
length(x_coordinates)
plot(x_coordinates,y_coordinates,'*');
doc plot
plot(x_coordinates,y_coordinates,'rs');
grid on
xlabel('Selection')
ylabel('Change')
title('Changes in Selection during the Past Year')
axis([0,12,-10,20])
bar(x_coordinates,y_coordinates)
figure
pie([4 2 7 4 7])
close(2)
close all
display a photo
imread('filename.jpg');
brainphoto=imread('wm_brain_regions.jpg');
image(brainphoto)
axis off