ENG 6 Lecture Notes - Lecture 12: Me And Mr. Johnson, Eric Clapton, Genius Loves Company

85 views3 pages

Document Summary

There is a unique function you can use to check it (help unique) Function fopen (help fopen) to display table, use fprintf (everything is text characters) Usually want to use structures rather than cells: code is easier to understand from outside perspective w/ structures. Can access objects in structure array by name; w/ cells you have to use indexing. To set value of items in a structure a, use following syntax: >>a. string = abcde", a , string: abcde", >>a. number = 42, a , string:"abcde", number:42. Fields in a structure are accessed in the same way, by using the dotted notation: >>a. number = a. number. /2, a = Manipulating field names: built in function fieldnames( ) returns cell array with field names as strings. Number": you can remove a field from a structure using rmfield( ) returns new structure w/ field removed, but does not remove field from original structure.

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