14.Things to Try ( type as seen at the MATLAB prompt >>) sqrt(-1) x = [-1 0 2] x = x' y = x - 1 inprod = x'*y outprod = x*y' who A = [1 2 3; 4 5 6; 7 8 0] B = A' B(1,1) B(:,1) B(1:2,:) x(3) C = A + B b = A*x x = inv(A)*b z = pi*x who w = x*y w = x.*y u = x^2 u = x.^2 z = cos(pi/3) z = [-1:0.05:1]' zz = cos(2*pi*z) plot(z,zz) plot(z,zz,z,zz,'ro') zz = exp(-1.5*z).*cos(2*pi*z) plot(z,zz,z,zz,'ro') title(`Figure 1'); xlabel(`Time'); ylabel(`Amplitude'); grid (create a file called bumps.m in your root directory. It should include:) function y = bumps(x) y = 1./((x-.3).^2+.01) + 1./((x-.9).^2+.04) - 6 (then at the prompt >>) x = -1:0.01:2; plot(x,bumps(x)) fplot(`bumps',[-1 2],0.01) x=-8:0.5:8; y = x; [X,Y]=meshgrid(x,y) plot(X,Y,'.') R = sqrt(X.^2 + Y.^2) +eps Z = sin(R)./R contour(x,y,Z,10) mesh(x,y,Z) meshc(x,y,Z) 15.MATLAB Command and Function Tables The 20 categories listed below provide command and function reference tables for their associated topic. To find "general" commands and functions for MATLAB, at the MATLAB prompt ">>", enter: help general To find MATLAB operators and special characters, at the MATLAB prompt ">>", enter: help ops Category Description -------- ------------------------------------------------ general General purpose commands ops Operators and special characters lang Language constructs and debugging elmat Elementary matricies and matrix manipulation specmat Specialized matricies elfun Elementary math functions specfun Specialized math functions matfun Matrix functions - numerical linear algebra datafun Data analysis and Fourier transform functions polyfun Polynomial and interpolation functions funfun Function functions - nonlinear numerical methods sparfun Sparse matrix functions plotxy Two dimensional graphics plotxyz Three dimensional functions graphics General purpose graphics functions color Color control and lighting model functions sounds Sound processing functions strfun Character string functions iofun Low-level file I/O functions demos Demonstrations and samples