Use of Coder.typeof results in crash of system

1 visualización (últimos 30 días)
Bhushan Ravindra Attarde
Bhushan Ravindra Attarde el 2 de Mayo de 2020
Hi,
I am working for Integration of GPU coder into simulink. I am taking Discrete Time State space equation as Entry pont function. In the next step, I am generating a dll for variable size matrix. In the next step I am defining coder.externalAPI to integrate dll with simulink. In the last step, I am creating a simulink model which has matlab function block which runs the code. This works perfectly fine for fixed size matrices. But when I am using variable size matrices in generating dll and running the simulation, the system stops working or gets crashed.
In generating dll, I am using coder.typeof method as follows:
A = coder.typeof(double(10),[100,100]);
Like this I am defining al the matrices.
But each time I run system, it gets crashed.
Also I tried using coder.varsize as follows:
A = rand(10);
coder.varsize('A',[100 100],[1 1]);
But it always create matrix of 10*10 only.If I give A = rand(15) after generating dll, still it shows answer for 10*10 matrix on simulink.
Can someone please help me with this issue?

Respuestas (0)

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by