CSE 7 Lecture Notes - Lecture 9: Bar Chart, Function Type, Row And Column Vectors

58 views2 pages

Document Summary

Figure - creates a new figure window. Hold on toggle that keeps current graph in figure window. Legend displays strings in a legend. Call this function by typing hist( your vector") . Each bar is called a bin, 10 is the default value of bins. The distance a bin covers is called the range. They take some kind of input and process it and produce an output. General form: functions save as . m files function [output_args] = fn_name(input_args) Ex: function [sum] = add (x1 , x2) % to call this function type result= add (1,2) sum= x1 + x2 % sum input_args end. Function that does not have a return value. % draws a figure with arguments x1 and x2. % to call this function, type draw(1, 2); % x1 and x2 are the input end. Which command produced this vector? v = [2 5 8 11]

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