MATLAB POLYSPACE RELEASE NOTES User Manual Page 32

  • Download
  • Add to my manuals
  • Print
  • Page
    / 240
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 31
2 Matrices and Arra ys
This matrix is almost the same as the one in the Dürer engraving and has
all the same “magic” properties; the only difference is that the two middle
columns are exchanged.
To make this
B into Dü rer’s A,swapthetwomiddlecolumns:
A = B(:,[1 3 2 4])
This says, for each of the rows of matrix B, reorder the elements in the order
1, 3, 2, 4. It produces
A=
163213
51011 8
96712
41514 1
WhywouldDürergotothetroubleofrearrangingthecolumnswhenhecould
have used MATLAB ordering? No doubt he wanted to include the date of the
engraving, 1514, at the bottom of his m agic square.
2-10
Page view 31
1 2 ... 27 28 29 30 31 32 33 34 35 36 37 ... 239 240

Comments to this Manuals

No comments