%% home->Preferences->MatLabEditor/Debugger->fonts->18 clear %% see file FirstStepMatLab.pdf + debugger (Select-> Evaluate Selection) A=rand(6) % matrix create; representation % end - the last element column1=A(1:end,1) % column1=A(:,1); [column1,A(:,1)]; all(A(:,1)==column1)% other form A(1:2:end)=0 spy(A) % dpends on number rows in matrix, show! cat(1,column1,A(:,1)) % along rows [column1;A(:,1)] - ,; ~ ansmy=cat(2,column1,A(:,1)) % along columns [column1,A(:,1)] %% matrix manipulation !!! new section help elmat %% Constructors + Edition: % zeros, ones, eye, diag, repmat, reshape % fliplr, flipud, flip %for classes (Double, Interger, Char) % triu, tril, blkdiag %% Analytics (size, properties) % size, ndims, length % isequal, isempty, find % isnan, isinf, isfinite, iszero % isreal %% special variables eps, realmax, realmin,pi, i,j,inf,nan true,false % 0,1 %% elementary functions help elfun % sind,tan, acos, % exp, log, log10, % sqrt, abs, angle, cong, imag, real % mod, rem, sign %% Study Help, see. с.4 FirstStepMatLab.pdf help ops %% graphics help graphics % plot x=-pi:0.1:pi % x=x_0:step:x_end y='exp(sin(x))*x' subplot(1,2,1), y=vectorize(y), y=eval(y) % или eval(vectorize(y)) plot(x,y) subplot(1,2,2), y= exp(sin(x)).*x % или eval(vectorize(y)) plot(x,y,'r>-') % cylinder - Generate cylinder. % sphere - Generate sphere. % ellipsoid - Generate ellipsoid. % patch - Create patch [Xc,Yc,Zc]=cylinder(2,40) [Xs,Ys,Zs]=sphere(40) [Xe,Ye,Ze]=ellipsoid(0,0,0,2,7,15,30)