I got a soluion for this issue,
set the variable in the workspace with command assignin(ws,var,val)
Simulink model look for variables in base workspace who is empty because valures are in GUI space.
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!