External Interfaces - The MathWorks - #451

/ 649


catalogue search
P. 451
P. 452
P. 453
P. 454
P. 455
P. 456
P. 457
P. 458
P. 459
P. 460
P. 461
P. 462
P. 463
P. 464
P. 465
P. 466
P. 467
P. 468
P. 469
P. 470
P. 471
P. 472
P. 473
P. 474
P. 475
P. 476
P. 477
P. 478
P. 479
P. 480
P. 481
P. 482
P. 483
P. 484
P. 485
P. 486
P. 487
P. 488
P. 489
P. 490
P. 491
P. 492
P. 493
P. 494
P. 495
P. 496
P. 497
P. 498
P. 499
P. 500


See other catalogues for The MathWorks

Text version of the page
Handling COM Data in MATLAB® Software
How to Pass a Single-Dimension SAFEARRAY
For information about passing arguments as one-dimensional arrays to a COM object, see the Technical Support solution 1-SKYP9 at http://www.mathworks.com/support/solutions/data/1-SKYP9.html.
Passing SAFEARRAY By Reference
For information about passing arguments by reference to a
COM object, see the Technical Support solution 1-SKYPY at
http://www.mathworks.com/support/solutions/data/1-SKYPY.html.
Reading SAFEARRAY from a COM Object in MATLAB® Applications
This section explains how MATLAB reads SAFEARRAY data from a COM object.
MATLAB reads a one-dimensional SAFEARRAY with n elements from a COM object as a 1 -by-n matrix. For example, using methods from the MATLAB sample control mwsamp,type:
h=actxcontrol('mwsamp.mwsampctrl.1') a = h.GetI4Vector
MATLAB displays:
a=
12 3
MATLAB reads a two-dimensional SAFEARRAY with n elements as a 2-by-n matrix. For example:
a = h.GetR8Array
MATLAB displays:
a=
12 3 4 5 6
9-81

pageCatalog pdf di En 2012-06-22-01