Azzera filtri
Azzera filtri

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

3 visualizzazioni (ultimi 30 giorni)
Umut Durak
Umut Durak il 11 Mar 2015
Modificato: TecBen il 28 Ott 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 Commento
TecBen
TecBen il 28 Ott 2015
Modificato: TecBen il 28 Ott 2015
The same problem happens with n-D-Loop-Up table blocks also. It was fixed in new MATLAB releases greater than R2010a.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su Simulink Coder in Help Center e File Exchange

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by