Posted Thu, 04 Jul 2013 13:17:23 GMT by Youri Amerlinck
I'm trying to use the principle of a lookup table in WEST.

I assume that I have to use the 'MSLUMatrixLoad'. Is it correct that this gives a table with discrete values. How should I proceed when I want to use this table with values in between the listed values?

Table
[table]
[tr]
[td]1 2 3[/td]
[/tr]
[tr]
[td]4 5 6[/td]
[/tr]
[/table]

So, 1 gives 4, 2 gives 5...

What would the value of 1.5 give ?
Posted Thu, 04 Jul 2013 13:46:15 GMT by Filip Claeys
In WEST 2012, one can read data from a file into temporary memory through ID = MSLUMatrixLoad(FileName) and hence use MSLUMatrixGet(ID, i, j) to get a value at position (i, j). So, in this case no interpolation is possible, unless it is implemented in MSL by the user.

In the upcoming WEST 2014,  in addition to the above, one will be able to read data from a file into a MSL-declared matrix through MSLUMatrixRead(ref(Matrix), NumRows, NumColumns, FileID) and hence use MSLUMatrixGetValue(ref(Matrix), NumRows, NumColumns, x, ColumnNo, Interpolated, Extrapolated) to interpolate and/or extrapolate, depending on the 2 last arguments.

You must be signed in to post in this forum.