Opened 13 years ago
Last modified 13 years ago
#1678 closed defect (fixed)
Implementation of Modelica.Blocks.Tables.CombiTable2D Interpolation outside interval is wrong
Reported by: | Jens Frenkel | Owned by: | Jens Frenkel |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | Version: | trunk | |
Keywords: | Cc: | Frenkel TUD, Frenkel TUD, Lennart Ochel, Willi Braun |
Description
MSL:
Table look-up in two dimensions (matrix/file)
If the input signal u1 or u2 is outside of the defined interval, the corresponding value is also determined by linear interpolation through the last or first two points of the table
Implementation:
/* if out of boundary, just set to min/max */
x1 = fmin(fmax(x1,InterpolationTable2D_getElt(table,1,0)),InterpolationTable2D_getElt(table,table->rows-1,0));
x2 = fmin(fmax(x2,InterpolationTable2D_getElt(table,0,1)),InterpolationTable2D_getElt(table,0,table->cols-1));
Note:
See TracTickets
for help on using tickets.