[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-1-en-105":3,"doc-seo-573819-105":53,"doc-detail-573819-en":125},{"code":4,"msg":5,"data":6},0,"success",[7,14,19,24,29,34,39,44,49],{"id":8,"doc_module":9,"doc_module_name":10,"category_name":11,"show_sort_weight":12,"slug":13},11,1,"Template","Presentations",90,"presentations",{"id":15,"doc_module":9,"doc_module_name":10,"category_name":16,"show_sort_weight":17,"slug":18},12,"Resumes",80,"resumes",{"id":20,"doc_module":9,"doc_module_name":10,"category_name":21,"show_sort_weight":22,"slug":23},14,"Invoices",70,"invoices",{"id":25,"doc_module":9,"doc_module_name":10,"category_name":26,"show_sort_weight":27,"slug":28},15,"Posters",60,"posters",{"id":30,"doc_module":9,"doc_module_name":10,"category_name":31,"show_sort_weight":32,"slug":33},16,"Social Media",50,"social-media",{"id":35,"doc_module":9,"doc_module_name":10,"category_name":36,"show_sort_weight":37,"slug":38},17,"Forms",40,"forms",{"id":40,"doc_module":9,"doc_module_name":10,"category_name":41,"show_sort_weight":42,"slug":43},18,"Letters",30,"letters",{"id":45,"doc_module":9,"doc_module_name":10,"category_name":46,"show_sort_weight":47,"slug":48},21,"Paper Templates",5,"papers-templates",{"id":50,"doc_module":9,"doc_module_name":10,"category_name":51,"show_sort_weight":4,"slug":52},158,"General","general-158",{"code":4,"msg":54,"data":55},"ok",{"site_id":56,"language":57,"slug":58,"title":59,"keywords":60,"description":61,"schema_data":62,"social_meta":118,"head_meta":120,"extra_data":122,"updated_unix":124},105,"en","matlab-cheat-sheet-basics","Matlab Cheat-sheet - Basics","","A compact MATLAB cheat-sheet summarizing core workflows and syntax from the MIT 18.06 (Fall 2007) context. It covers saving and loading variables, diary logging, inspecting defined variables, clearing workspace, and retrieving command help. It explains variable creation, vector and matrix construction, indexing and slicing, arithmetic and common numeric functions, linear equation solving operations, and essential plotting commands with labels, legends, and scaling.",{"@graph":63,"@context":117},[64,80,100],{"@type":65,"itemListElement":66},"BreadcrumbList",[67,71,74,77],{"item":68,"name":69,"@type":70,"position":9},"https://docshare.wps.com","Home","ListItem",{"item":72,"name":10,"@type":70,"position":73},"https://docshare.wps.com/template/",2,{"item":75,"name":11,"@type":70,"position":76},"https://docshare.wps.com/template/presentations/",3,{"item":78,"name":59,"@type":70,"position":79},"https://docshare.wps.com/template/matlab-cheat-sheet-basics/573819/",4,{"url":78,"name":59,"@type":81,"image":82,"author":87,"headline":59,"publisher":90,"fileFormat":93,"inLanguage":57,"description":61,"dateModified":94,"datePublished":94,"encodingFormat":93,"isAccessibleForFree":95,"interactionStatistic":96},"DigitalDocument",{"url":83,"@type":84,"width":85,"height":86},"https://docshare.wps.com/thumbnails/matlab-cheat-sheet-basics/573819.png","ImageObject",442,249,{"name":88,"@type":89},"Đào","Person",{"url":68,"name":91,"@type":92},"DocShare","Organization","application/pdf","2026-10-14",true,{"@type":97,"interactionType":98,"userInteractionCount":9},"InteractionCounter",{"@type":99},"ViewAction",{"@type":101,"mainEntity":102},"FAQPage",[103,109,113],{"name":104,"@type":105,"acceptedAnswer":106},"How do you save and load variables in MATLAB according to the cheat-sheet?","Question",{"text":107,"@type":108},"Use save 'file.mat' to save variables and load 'file.mat' to load variables from that file. The sheet also notes diary on/off for recording I/O to a file.","Answer",{"name":110,"@type":105,"acceptedAnswer":111},"How can you create vectors and matrices and access parts of them?",{"text":112,"@type":108},"Assign with x = [1 2 3] or use column form x = [1;2;3]. Build matrices like A = [1 2 3 4; 5 6 7 8; 9 10 11 1 2], then slice with forms such as x(2:12), x(2:end), and A(5,:) or A(:,2).",{"name":114,"@type":105,"acceptedAnswer":115},"What plotting and basic math tools are included?",{"text":116,"@type":108},"The cheat-sheet lists plot(x,y), loglog, semilogx, and semilogy, plus axis equal, title, xlabel/ylabel, legend, grid, and figure. It also covers arithmetic, powers, sqrt, exp, log/log10, abs, trig like sin, and matrix operations like A\\b and eig(A).","https://schema.org",{"og:url":78,"og:type":119,"og:title":59,"og:site_name":91,"og:description":61},"article",{"robots":121,"canonical":78},"index,follow",{"doc_id":123,"site_id":56},573819,1792014307,{"code":4,"msg":5,"data":126},{"doc_id":123,"user_id":127,"nickname":88,"user_avatar":128,"doc_module":9,"category_id":8,"category_name":11,"doc_title":59,"doc_description":61,"doc_content":129,"file_id":130,"file_url":131,"file_type":132,"file_size":133,"view_count":9,"is_deleted":4,"is_public":9,"is_downloadable":9,"audit_status":9,"page_count":9,"language":134,"language_code":57,"site_id":56,"html_lang":57,"table_of_contents":135,"faqs":136,"seo_title":137,"seo_description":61,"update_tm":138,"read_time":4},1374402968488,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","A Matlab Cheat-sheet (MIT 18.06, Fall 2007)  \nBasics:  \nsave ' file .mat ' save variables tofile.mat  \nload ' file .mat ' load variables fromfile.mat  \ndiary on record input/output to file diary  \ndiary off stop recording  \nwhos list all variables currenly defined  \nclear delete/undefine all variables  \nhelp command quick help on a given command  \ndoc command extensive help on a given command  \nDefining/changing variables: x = 3 define variable x to be 3  \nx = [ 1 2 3] set x to the 1×3 row-vector (1,2,3) x = [ 1 2 3] ; same, but don't echo x to output x = [ 1;2;3] set x to the 3× 1 column-vector (1,2,3)  \nA = [ 1 2 3 4; 5 6 7 8; 9 10 11 1 2] ;  \nset A to the 3×4 matrix with rows 1,2,3,4 etc. x(2 ) = 7 change x from (1,2,3) to (1,7,3)  \nA (2 ,1 ) = 0 change A2,1 from 5 to 0  \nArithmetic and functions of numbers:  \n3*4 , 7+ 4, 2-6 8/3 multiply, add, subtract, and divide numbers 3^7 , 3^ (8+2 i) compute 3 to the 7th power, or 3 to the 8+2i power  \nsqrt( -5 ) compute the square root of–5 exp (12) compute e12  \nlog (3 ), log10 (1 00 ) compute the natural log (ln) and base-10 log (log 10) abs (-5) compute the absolute value |–5|  \nsin (5*pi/ 3) compute the sine of 5π/3  \nbesselj (2 ,6 ) compute the Bessel function J2(6)  \nArithmetic and functions of vectors and matrices: x * 3 multiply every element of x by 3  \nx + 2 add 2 to every element of x  \nx + y element-wise addition of two vectors x and y A * y product of a matrix A and a vector y  \nA * B product of two matrices A and B  \nx * y not allowed if x and y are two column vectors! x . * y element-wise product of vectors x and y A^3 the square matrix A to the 3rd power x ^3 not allowed if x is not a square matrix! x . ^ 3 every element of x is taken to the 3rd power cos (x) the cosine of every element of x  \nabs(A ) the absolute value of every element of Aexp(A ) e to the power of every element of Asqrt(A) the square root of every element of A  \nexpm(A) the matrix exponential eA sqrtm(A ) the matrix whose square is A  \nConstructing a few simple matrices:  \nrand( 12 ,4 ) a 12×4 matrix with uniform random numbers in [0,1)  \nrandn (12,4) a 12×4 matrix with Gaussian random (center 0, variance 1)  \nzeros (12,4) a 12×4 matrix of zeros ones( 12 ,4 ) a 12×4 matrix of ones eye (5 ) a 5×5 identity matrix I (“eye”)  \neye (12,4) a 12×4 matrix whose first 4 rows are the 4×4 identity linspace( 1.2, 4.7 ,1 00 )  \nrow vector of 100 equally-spaced numbers from 1.2 to 4.7  \n7 :15 row vector of 7,8,9,…, 14, 15  \ndiag(x) matrix whose diagonal is the entries of x (and other elements = 0)  \nPortions of matrices and vectors:  \nx(2 :12 ) the 2nd to the 12th elements of x  \nx(2 :end) the 2nd to the last elements of x  \nx(1 :3 :end) every third element of x, from 1st to the last  \nx(: ) all the elements of x  \nA (5 ,: ) the row vector of every element in the 5th row of A  \nA (5,1 :3) the row vector of the first 3 elements in the 5th row of AA (:,2 ) the column vector of every element in the 2nd column of A  \ndiag(A ) column vector of the diagonal elements ofA  \nSolving linear equations:  \nA \\ b for A a matrix and b a column vector, the solution x to Ax=b  \ninv (A ) the inverse matrix A–1  \n[L,U,P ] = lu(A ) the LU factorization PA=LU  \neig (A ) the eigenvalues ofA  \n[V,D] = eig(A) the columns of V are the eigenvectors ofA, and  \nthe diagonals diag(D) are the eigenvalues ofA Plotting:  \nplot(y) plot y as the y axis, with 1,2,3,…as the x axis plot(x,y) plot y versus x (must have same length)  \nplot(x,A) plot columns ofA versus x (must have same \\# rows) loglog(x,y) plot y versus x on a log-log scale  \nsemilogx(x,y) plot y versus x with x on a log scale  \nsemilogy(x,y) plot y versus x with y on a log scale fplot (@ (x) …expression…,[a,b])  \nplot some expression in x from x=a to x=b  \naxis equal force the x and y axes of the current plot to be scaled equally  \ntitle ('A Title' ) x label( 'blah' ) ylabel( 'blah' )  \nadd a title A Title at the top of the plot label the x axis as blah  \nlabel the y axis as blah  \nl","cbCaijJOCWz5eKvo","https://ap.wps.com/l/cbCaijJOCWz5eKvo","pdf",69673,"English","# Basics\n## Variables and workspace\n## Defining variables and arrays\n## Arithmetic, functions, and matrix operations\n## Constructing matrices and indexing\n## Linear equations\n## Plotting","[{\"question\":\"How do you save and load variables in MATLAB according to the cheat-sheet?\",\"answer\":\"Use save 'file.mat' to save variables and load 'file.mat' to load variables from that file. The sheet also notes diary on/off for recording I/O to a file.\"},{\"question\":\"How can you create vectors and matrices and access parts of them?\",\"answer\":\"Assign with x = [1 2 3] or use column form x = [1;2;3]. Build matrices like A = [1 2 3 4; 5 6 7 8; 9 10 11 1 2], then slice with forms such as x(2:12), x(2:end), and A(5,:) or A(:,2).\"},{\"question\":\"What plotting and basic math tools are included?\",\"answer\":\"The cheat-sheet lists plot(x,y), loglog, semilogx, and semilogy, plus axis equal, title, xlabel/ylabel, legend, grid, and figure. It also covers arithmetic, powers, sqrt, exp, log/log10, abs, trig like sin, and matrix operations like A\\\\b and eig(A).\"}]","Matlab Cheat-sheet - Basics | PDF",1791947475]