hello 4+7 ans*2 x = 40*3 - 6.5*pi 6^7 sqrt(78) (6-5)*((5-9)+2) v = [43 25 12 10 2] 2*v 8*v + 7 w = [13 12 11 10 9] v + w v.*w v*w sin(4) cos(.3) exp(7) exp(-7) help sin sin(v) r = rand(5,8) sin(r) rand rand(8,4) zeros(8,4) ones(8,4) pi*ones(8,4) format long pi*ones(8,4) format short pi*ones(8,4) x = [-10:10] x = [-10:.1:10] y = x.^2 figure plot(x,y) get(1,'color') set(1,'color',[1 1 1]) set(1,'color',[0 0 0]) set(1,'color',[0 0 1]) set(1,'color',[1 1 1]) xlabel('Variable X') ylabel('Variable Y') set(gca, 'fontsize', 20) title('Parabola') saveas(1,'parabola_figure.png') cd ../ cd CSASS ls cd Workshop_Oct19_2018/ ls saveas(1,'parabola_figure.png') plot(x,y,'color', [1 .4 .4]) hold on plot(x,-y) plot(x,-y,'color',[0 1 0],'linewidth',3) P = plot(x,-y,'color',[0 1 0],'linewidth',3) plot(x,y,'o','color','b') text(-6, 60, 'Blue curve', 'fontsize', 18) bar(y) clf bar(y) bar([4 3 5 2 4]) x = rand(1,20); x = 4 x = rand(1,20) x = rand(1,2000) x = rand(1,2000); randn 2*randn + 5 x = 2*randn(1,100) + 5 hist(x) v = [67 125 70 180 62 150 73 195 59 110 68 170 70 159 66 159 68 123 71 182 66 130 70 202 63 152 67 177 64 138 65 146 67 149 74 188 62 112 70 192] xlsread('sample_data2') [Num Txt Raw] = xlsread('sample_data2') who whos save myvariables.mat v w x y clear all who whos x load myvariables.mat whos v w xlsread('sample_data2','A2:D11') v = xlsread('sample_data2','A2:D11') mean(v) mean(v,2) mean(mean(v)) mean(v(:)) v(:) v v(5,2) v(5,:) v(:,2) v(:,1) mean(v(:,1)) std(v) std(v(:,1)) median(v(:,1)) mode(v(:,1)) min(v(:,1)) max(v(:,1)) sort(v(:,1)) [v2 k] = sort(v(:,1)) help sort sort(v(:,1),1,'descend') vsorted = sort(v(:,1)) vsorted(10:-1:1) vsorted(end:-1:1) summary grpstats(vsorted(end:-1:1)) [a b c d] = grpstats(vsorted(end:-1:1)) [a b c d e f ] = grpstats(vsorted(end:-1:1)) w = [67 125 62 150 59 110 70 159 68 123 66 130 63 152 64 138 67 149 62 112 70 180 73 195 68 170 66 159 71 182 70 202 67 177 65 146 74 188 70 192] figure plot(w(:,1),w(:,2)) plot(w(:,1),w(:,2),'-') plot(w(:,1),w(:,2),'.-') plot(w(:,1),w(:,2),'.') plot(w(:,1),w(:,2),'.','markersize',20) plot(w(:,1),w(:,2),'.','markersize',20,'color','k') xlabel('Heights') ylabel('Weights') edit gender_data.m gender_data commandhistory x = randn(20,1); y = randn(20,1); x = randn(20,1) figure plot3(x,y,z) z = randn(20,1); plot3(x,y,z) plot3(x,y,z,'*') xlabel('x') ylabel('y') zlabel('z') view(0,-90) view(44,-20) hist3([x y]) sample_survey nick 42 blue clear all load nick.mat whos q2 q2*2 q3 sample_click clear all load click_data.mat clear all load('click_data.mat') whos x y rt face_modeling for i=1:100 imagesc(rand(100,100)); axis equal; colormap gray; pause(.7) end commandhistory