Lookup Table Error: Values of 'Breakpoin​tsForDimen​sion1' in 'Model' must be strictly monotonically increasing.

222 visualizzazioni (ultimi 30 giorni)
There are already many question related to this topic, I rad them through and couldn't find a solution to this issue. Forgive me if the question is repeating.
As you can see in the picture the lookup table has monotonically increasing values of both breakpoints.
The column values are increasing with the stepsize(2) until the end, i.e. 40 to 154 (58 entries)
The row values are increasing with the stepsize(5) until the end, i.e. 115 to 280 (34 entries)
(is it because the column and row stepsize are different?)
Can someone please help to understand why does it keep showing the same error? Any advise or help would be great!
Error message : Values of 'BreakpointsForDimension1' in 'Model_xyz' must be strictly monotonically increasing. The problem occurs at element 2. Change the breakpoints data or use the fixed-point tools such as Auto Scaling or Fixed-Point Advisor to determine a different parameter dialog type.
  1 Commento
AKASH DEEP
AKASH DEEP il 12 Ott 2023
Hi,
I have the data which is decreasing, then what should I do it is showing the same error.
[4.1834 4.0550 3.9446 3.8467 3.7565 3.6814 3.6449 3.6154 3.5577 3.4818] this is my break point data

Accedi per commentare.

Risposta accettata

Andy Bartlett
Andy Bartlett il 7 Mar 2022
Modificato: Andy Bartlett il 8 Mar 2022
Please check the data type specified for the breakpoints.
Quantization of the original value to the specified run-time data type could cause repeated values.
Example 1 Parameter type is int8
vOrig1 = 115:5:135
dtName1 = 'int8';
vQuantized1 = cast(vOrig1,dtName1)
outputs
vOrig1 =
115 120 125 130 135
vQuantized1 =
1×5 int8 row vector
115 120 125 127 127
Notice that the last two values are equal and thus not monotonically increasing.
Example 2 Parameter type Fixed-Point
Orig2 = 40:2:46
nt2 = numerictype(1,8,2)
vQuantized2 = fi(vOrig2,nt2)
outputs
vOrig2 =
40 42 44 46
nt2 =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 2
vQuantized2 =
31.7500 31.7500 31.7500 31.7500
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 8
FractionLength: 2
Notice that all the values are equal and thus not monotonically increasing.
Example 3 Parameter type Single
vOrig3 = 2^25 + (1:5)
dtName3 = 'single';
vQuantized3 = cast(vOrig3,dtName3)
outputs
vOrig3 =
33554433 33554434 33554435 33554436 33554437
vQuantized3 =
1×5 single row vector
33554432 33554432 33554436 33554436 33554436
Notice that the first two values are equal and the last three values are equal, thus the vector of breakpoints is not monotonically increasing.
  4 Commenti
Taimoor Khan Mehmand
Taimoor Khan Mehmand il 25 Ago 2022
Hi Garvit! May I know which version of the MATLAB/Simulink were you using when you encountered this error? Actually, I encountered this problem when I used my Simulink model that I built in 2018a in the 2021a version.
Secondly, in your last comment where you mentioned and I quote ( Just by choosing 'int32' for the table and breakpoint 'input data type' worked. ). I am unable to find the " input data type " option in the properties of of n-D Lookuptable block. Can you please share the screen shot of the properties window etc ?
I have attached the screen shots of the windows of the Lookuptable block.
Andy Bartlett
Andy Bartlett il 25 Ago 2022
Like most blocks, the Lookup Table block does not set the data types for its inputs.
It inherits them from the block upstream that outputs the signal that become the Lookup's input.
Hint 1: Turn on Display Port Data Types to make it easier investigate type related issues.
Hint 2: If you don't understand a type from it's name such as 'sfix16_En3', just feed the name to numerictype
nt = numerictype('sfix16_En3')
nt =
DataTypeMode: Fixed-point: binary point scaling
Signedness: Signed
WordLength: 16
FractionLength: 3
You can also look at some key attributes of the type
minMaxRepresentable = nt.range
representableValueSpacingIntegerOrFixedPoint = nt.Slope
minMaxRepresentable =
-4096 4095.875
numerictype(1,16,3)
representableValueSpacingIntegerOrFixedPoint =
0.125

Accedi per commentare.

Più risposte (0)

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by