Filter löschen
Filter löschen

Output Array of Fortran Level-2 S-function

1 Ansicht (letzte 30 Tage)
Egambaravel
Egambaravel am 12 Aug. 2013
I am able to pass the vector (1D array) in to the Fortran code through C gateway, and the S-function is working fine. This is how I pass the input
float fta[3];
for (i=0; i<3; i++) { fta[i] = (float)*uPtrs0[i]; } FortranCode_(&fta....);
In similar way i tried to take the vector as the S-function output and the simulink got crashed. Can anybody give a valuable suggestion on this issue? i tried this way
real_T *y15 = ssGetOutputPortRealSignal(S,15);
y15 [0] = x [42]; y15 [1] = x [43]; y15 [2] = x [44];
x is the Dwork vector

Akzeptierte Antwort

Egambaravel
Egambaravel am 12 Aug. 2013
Sorry, it's working. The main issue was the contiguous declaration. Earlier i fixed them as 1 instead of 0.
Thank you.

Weitere Antworten (0)

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by