%% Calculations ... sqrt(144) 144^0.5 ans^2 % split a long calculation into two lines, with ... some_number = 1 + 1 + 1/2 + 1/6 + 1/24 + ... 1/120 + 1/720 + 1/5040 %% Make a plot x = linspace(0, 2*pi, 100); y1 = sin(x); y2 = cos(x); plot(x,y1,x,y2); % what is the 12 th element? print to command window a = 12; x(a) y1(a) y2(a) % print more compactly - note these need to be grouped into an array with % the square brackets disp( [x(a),y1(a),y2(a)] ); %% Make a plot in a new window figure(2) plot(y1,y2);