MATLAB DATABASE TOOLBOX RELEASE NOTES Guide de l'utilisateur Page 333

  • Télécharger
  • Ajouter à mon manuel
  • Imprimer
  • Page
    / 684
  • Table des matières
  • MARQUE LIVRES
  • Noté. / 5. Basé sur avis des utilisateurs
Vue de la page 332
Retrieving BINARY and OTHER Data Types
5-55
Retrieving BINARY and OTHER Data Types
This example shows how to retrieve data of types BINARY and OTHER, which may require
manipulation before it can undergo MATLAB processing. To retrieve images using the
dbtoolboxdemo data source and a sample file that parses image data, matlabroot/
toolbox/database/vqb/parsebinary.m:
1
For Data Operation, select Select.
2
In Data source, select dbtoolboxdemo.
3
In Tables, select Invoive.
4
In Fields, select InvoiceNumber and Receipt (which contains bitmap images).
5
Select Query > Preferences.
6
In the Data return format field, specify cellarray.
7
As the MATLAB workspace variable, specify A.
8
Click Execute to run the query.
9
Type A in the Command Window to view the query results.
A =
[1] [21626x1 int8]
[2] [21626x1 int8]
[3] [21722x1 int8]
[4] [21626x1 int8]
[5] [21626x1 int8]
[6] [21626x1 int8]
[7] [21626x1 int8]
[8] [21626x1 int8]
[9] [21626x1 int8]
10
Assign the first element in A to the variable photo.
photo = A{1,2};
11
Make sure your current folder is writable.
12
Run the sample program parsebinary, which writes the retrieved data to a file,
strips ODBC header information, and displays photo as a bitmap image.
cd I:\MATLABFiles\myfiles
parsebinary(photo, 'BMP');
Vue de la page 332
1 2 ... 328 329 330 331 332 333 334 335 336 337 338 ... 683 684

Commentaires sur ces manuels

Pas de commentaire