How to Initailize MWStructArray

조회 수: 6 (최근 30일)
Sadanand
Sadanand 2011년 7월 12일
How do I initialize my MWStructArray with two fields and 5 elements.

채택된 답변

Friedrich
Friedrich 2011년 7월 12일
Hi,
#include "mclcppclass.h"
const char* fields[] = {"a", "b"};
mwArray my_struct(1, 5, 2, fields);
See doc for more:
  댓글 수: 4
Friedrich
Friedrich 2011년 7월 12일
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 2011년 7월 12일
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.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to .NET Applications Using MWArray API에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by