Effacer les filtres
Effacer les filtres

GRT Code from R2007b for 3-D Lookup does not compile

3 vues (au cours des 30 derniers jours)
Umut Durak
Umut Durak le 11 Mar 2015
Modifié(e) : TecBen le 28 Oct 2015
When I generate code using GRT in R2007b for 3-D Lookup blocks, I come with a source code;
/* Lookup 3-D
Search method: 'binary'
Use previous index: 'off'
Interpolation method: 'Linear'
Extrapolation method: 'Linear'
Use last breakpoint for index at or above upper limit: 'off'
*/
bpLocalVar0 = bpDataSet[0U];
bpLocalVar1 = bpDataSet[1U];
bpLocalVar2 = bpDataSet[2U];
maxIndex0 = maxIndex[0U];
maxIndex1 = maxIndex[1U];
maxIndex2 = maxIndex[2U];
maxIndex0 = plook_binx(u0, bpLocalVar0, maxIndex0, &frac);
fractions[0U] = frac;
bpIndices[0U] = maxIndex0;
...
...
But Visual Studio 2010 C++ compiler complains about the lines starting with bpLocal and says "Error C2440: cannot convert from 'void* const' to 'real_T*'. As I manualy make a type casting like
bpLocalVar0 = (realt_T*) bpDataSet[0U];
it works. Anything that I miss in code generation / optimization settings? or is there a bug in GRT tlc files for 3-D Lookup? This breaks my code generation pipeline quite severely. How can I fix it? Any ideas?
  1 commentaire
TecBen
TecBen le 28 Oct 2015
Modifié(e) : TecBen le 28 Oct 2015
The same problem happens with n-D-Loop-Up table blocks also. It was fixed in new MATLAB releases greater than R2010a.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Simulink Coder dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by