Hi, dear Matlab users/experts.
I need create model, which able to received data (array of 20 elements) from up hardware interface, example, data is [1 2 3 4 5 6 7 8 9 ... 18 19 20].
This array is goes into a matlab function, which i perform data parsing to map my variables. Example:
byte1 value = 1 (1st element), it is mapped to Var01, and byte2 value = 2 (2nd element) is mapped to Var02 and subsequent variables is mapped in this order.
Following is my matlab function
function  = my_func(u) global Var01; global Var02; : global Var20;
Var01 = u(1); Var02 = u(2); : Var20 = u(20);
When i run simulation, i can see that Var01, Var02, ... Var20 are updated respectively if the 20 elements of array are changed.
I am doing this is because my variables data order might changes time-to-time, so the array of data is goes to matlab function for data parsing.
Here comes the problem. In the model, i added Var01, 02 ... 20 as "From Workspace (source block)" and put display (or scope) at the point for these Var01, Var02 and etc ("From Workspace block). When running simulation, array is updated, so as variable in Workspace windows in Matlab, but WHY the "From Workspace" (display/scope) data is not updated???
Anyone know how to resolve this data "From Workspace" not updating issue???