How to Initailize MWStructArray

5 visualizzazioni (ultimi 30 giorni)
Sadanand
Sadanand il 12 Lug 2011
How do I initialize my MWStructArray with two fields and 5 elements.

Risposta accettata

Friedrich
Friedrich il 12 Lug 2011
Hi,
#include "mclcppclass.h"
const char* fields[] = {"a", "b"};
mwArray my_struct(1, 5, 2, fields);
See doc for more:
  4 Commenti
Friedrich
Friedrich il 12 Lug 2011
Maybe look at the phonebook example provided in the doc:
http://www.mathworks.com/help/releases/R2011a/toolbox/dotnetbuilder/ug/brl3b0g-1.html
(click on the PhoneBookApp.cs)
Sadanand
Sadanand il 12 Lug 2011
Thanx Friedrich.. I was unable to do as I was using MathWorks.MATLAB.NET.NAtive.Arrays. Now i m using MathWorks.MATLAB.NET.Arrays so its working fine.

Accedi per commentare.

Più risposte (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by