GEN ENG 205 Lecture Notes - Lecture 3: Random Matrix, Negative Number, Semicolon

46 views1 pages

Document Summary

It is more efficient to use matrices than to use loops. The operator . can be used to multiply matrices element-by- element. You can double-click entries in command history to re-execute them. End commands with a semicolon to prevent matlab from giving you several lines of feedback (output suppression). When entering entries for a matrix or vector, surround the collection of entries with brackets. Commas and spaces make an entry in the next column. Semicolons make an entry in the next row. To print an entry within matrix m, type. M(a, b) where a and b are that entry"s coordinates within the matrix. % triggers comments. clear empties the workspace. clc clears the command window. To concatenate vectors or matrices, do something like this: a=[1 2] b=[3 4 5] c=[a b] The result will be that c=[1 2 3 4 5]. For instance, 1:2:12 -> [1 3 5 7 9 11] To count backwards, simply increment by a negative number.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents