MATLAB POLYSPACE RELEASE NOTES Manuale Utente Pagina 125

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 240
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 124
Plotting Image Data
Plotting Image Data
In this section.. .
“About Plotting Image Data” on page 3-69
“Reading and Writing Images” on page 3-70
About Plotting Image D ata
Two-dimensional arrays can be displayed as images, where the array elements
determine brightness or color of the images. For example, the statements
load durer
whos
Name Size Bytes Clas s
X 648x509 2638 656 double array
caption 2x2 8 112 char array
map 128x3 3072 doubl e array
load the file du rer. mat, adding three variables to the workspace. The m atrix
X isa648-by-509matrixandmap is a 128-by-3 matrix that is the colormap
for this image.
MAT-files, such as
durer.mat, are binary files that can be created on one
platform and later read by MATLAB on a differe nt platform.
The elements of
X are integers between 1 a nd 128, which serve as indices
into the colormap,
map.Then
image(X)
colormap(map)
axis image
reproduces Albrecht Dürer’s etching shown in “Matrices and Magic Squares”
on page 2-2. A high-resolution scan of the magic square in the upper-right
corner is available in another file. Type
load detail
3-69
Vedere la pagina 124
1 2 ... 120 121 122 123 124 125 126 127 128 129 130 ... 239 240

Commenti su questo manuale

Nessun commento