MATLAB POLYSPACE RELEASE NOTES User Manual Page 156

  • Download
  • Add to my manuals
  • Print
  • Page
    / 240
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 155
4 Programming
Similarly, you can create a cell array from the name fields by enclosing the
list-generating expression within curly braces:
names = {S.name}
names =
'Ed Plum' 'Toni Miller' 'Jerry Garcia'
To assign the fields of each element of a structure array to separate variables
outside o f the structure, specify each output to the left of the equals sign,
enclosing them all within square brackets:
[N1 N2 N3] = S.name
N1 =
Ed Plum
N2 =
Toni Miller
N3 =
Jerry Garcia
Dynamic Field Names
The most common way to access the data in a structure is by specifying the
name of the field that you want to reference. A nother means of accessing
structure data is to use dynamic field names. These names express the
field as a variable expression that MATLAB evaluates at run-time. The
dot-parentheses syntax shown here makes
expression adynamicfieldname:
structName.(expression)
Index into this field using the standard MATLAB indexing syntax. For
example, to evaluate
expression into a field name and obtain the values of
that field at columns
1 through 25 of row 7,use
structName.(expression)(7,1:25)
Dynamic Field Nam es Exam pl e. The avgscore function shown b elow
computes an average test score, retrieving information from the
testscores
structure using dynamic field names:
function avg = avgscore(testscores, student, first, last)
for k = first: last
scores(k) = testscores.(student).w eek( k);
4-18
Page view 155
1 2 ... 151 152 153 154 155 156 157 158 159 160 161 ... 239 240

Comments to this Manuals

No comments

Energizer CAPP2BODE manuali

Manuali dei proprietari e guide per l'utente per Torce Energizer CAPP2BODE.
We fornisce 1 manuali pdf Energizer CAPP2BODE per scaricare gratuitamente in base al tipo di documento: Scheda Tecnica


Energizer CAPP2BODE Scheda Tecnica (1 pagine)


Marchio: Energizer | Categoria: Flashlights | Dimensione: 0.07 MB |

 




Più prodotti e manuali per Torce Energizer

Modelli Tipo di Documento
627462 Scheda Tecnica   Energizer Booklite, 1 pagine
ENSHH31L Scheda Tecnica   Energizer ENSHH31L flashlight, 1 pagine
625700 Scheda Tecnica   Energizer Princess, 1 pagine
ENSHL11L Scheda Tecnica   Energizer ENSHL11L flashlight, 1 pagine
628909 Scheda Tecnica   Energizer ATEX 2D Intrinsically Safe LED, 1 pagine
HDL1AAE Scheda Tecnica   Energizer HDL1AAE flashlight, 1 pagine
628908 Scheda Tecnica   Energizer ATEX 2AA Intrinsically Safe LED, 1 pagine
WRRCNM3G Scheda Tecnica   Energizer WRRCNM3G flashlight, 1 pagine
WR2A3ACE Scheda Tecnica    Energizer WR2A3ACE flashlight, 1 pagine
EDMCC42E Manuale Utente   Energizer EDMCC42E flashlight, 1 pagine
HD33A3CE Manuale   Energizer HD33A3CE flashlight, 2 pagine
HDL33A2E Manuale   Energizer HDL33A2E flashlight, 1 pagine