필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
Umut Durak
Umut Durak 2015년 3월 11일
편집: TecBen 2015년 10월 28일
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
TecBen
TecBen 2015년 10월 28일
편집: TecBen 2015년 10월 28일
The same problem happens with n-D-Loop-Up table blocks also. It was fixed in new MATLAB releases greater than R2010a.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by