Setting Look Up Table parameter 'Table' from GUI using set_param
Ältere Kommentare anzeigen
I want to set the LUT parameter 'Table' frm a GUI:
Lookup Table (n-D): ..... simulink library block
Table data: wArray
Breakpoints 1: ........
I am writing the following code in edit callback in GUI:
wNewVal = str2double(get(hObject,'String'));
w=wNewVal;
wArray=[w w 0 0 -1*w -1*w 0 0]
set_param('SDH/Tp/w','Table','wArray')
i can run the code without any errors but if i run my simulation..i get the following error:
Error evaluating parameter 'Table' in 'SDH/Tp/w'
Caused by:
Undefined function or variable 'wArray'.
See this also:
get_param('SDH/Tp/w','Table')
ans =
wArray
Akzeptierte Antwort
Weitere Antworten (1)
SENTHILKUMAR
am 27 Okt. 2015
1 Stimme
For the above question, How will you set the values for Breakpoints. When I try to do that in a same way which was mentioned. I am getting the following error
Lookup_n-D block does not have a parameter named 'Breakpoints'.
It recognizes tabledata parameter but not breakpoints parameter. How to overcome that?
3 Kommentare
Huan
am 18 Dez. 2015
It is not named as 'Breakpoints'. Try the below command, bro. LookupTable = find_system(sys,'BlockType','Lookup_n-D'); get_param(LookupTable,'BreakpointsForDimension1')
Kurt Stewart
am 14 Jan. 2019
Thanks that works perfect
Kurt Stewart
am 14 Jan. 2019
'TableData' is the name for the table data if people are wondering
Kategorien
Mehr zu Model, Block, and Port Callbacks finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!