How to code a struct input into the c++ app file for shared library

조회 수: 1 (최근 30일)
Oindri
Oindri 2018년 1월 30일
Input to my function is a structure with fields filename (string type) and fft (double). I have followed the MWStructExample.cpp (phonebook example). Please guide as to how it should be further coded. I doubt the syntaxing is wrong somewhere.
const char *input[] = {"filename", "fft"};
mwSize dims[2] = {1, NUMBER_OF_STRUCTS };
mwArray stru(2,dims, 2, input);
mwArray filename(m, n, mxDOUBLE_CLASS);
mwArray fft(1, 1, mxDOUBLE_CLASS);
stru.Get(input[0],1,1).Set(filename);
stru.Get(input[1],1,1).Set(fft);

답변 (0개)

카테고리

Help CenterFile Exchange에서 Deploy to C++ Applications Using mwArray API (C++03)에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by