MATLAB Answers

rum
0

Using Simulink.i​mportExter​nalCTypes

Asked by rum
on 22 Aug 2018
Latest activity Edited by Phani Teja on 11 Jul 2019
My test.h file has following typedef
typedef struct ParameterLF_{
double x[10][10];
double y[10][10];
double z[10][10];
}ParameterLF;
when executing Simulink.importExternalCTypes('test.h');
I get following warning
Warning: 'ParameterLF' from file 'D:\Documents\WorkMatlab\test.h' is not imported. It has a field whose type is unsupported in Simulink.
How can I use types containing C arrays? Is there a workaround?

  0 Comments

Sign in to comment.

1 Answer

Answer by Phani Teja on 11 Jul 2019
Edited by Phani Teja on 11 Jul 2019

This is the limiatation of 'Simulink.importExternalCTypes' to access the Structures that define a field whose value has more than one dimension.
Check limitations in below link
If a field value is a 1-D array, the function creates a bus element that represents a vector, not a matrix.

  0 Comments

Sign in to comment.