MATLAB DATABASE TOOLBOX RELEASE NOTES Guida Utente Pagina 335

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 684
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 334
Importing and Exporting Boolean Data
5-57
Importing and Exporting Boolean Data
In this section...
“Import Boolean Data from Databases” on page 5-57
“Exporting Boolean Data to Databases” on page 5-60
Import Boolean Data from Databases
BOOLEAN data is imported from databases into the MATLAB workspace as data type
logical. This data has a value of 0 (false) or 1 (true), and is stored in a cell array or
structure.
This example imports data from the Invoice table in the dbtoolboxdemo database into
the MATLAB workspace.
1
Set Data return format to cellarray.
2
For Data operation, choose Select.
3
In Data source, select dbtoolboxdemo.
4
In Tables, select Invoice.
5
In Fields, select Paid and InvoiceNumber.
6
Assign the query results to the MATLAB workspace variable D.
7
Click Execute to run the query.
VQB retrieves a 10-by-2 array.
8
Enter D in the Command Window. 10 records are returned:
D =
[ 2101] [0]
[ 3546] [1]
[33116] [1]
[34155] [0]
[34267] [1]
[37197] [1]
[37281] [0]
[41011] [1]
Vedere la pagina 334
1 2 ... 330 331 332 333 334 335 336 337 338 339 340 ... 683 684

Commenti su questo manuale

Nessun commento