Home Questions how can I get the data in target table

how can I get the data in target table

DWQA QuestionsCategory: KINARM End-Point Labhow can I get the data in target table
Yihui Xu asked 4 years ago
i created a from block to call the target_table and use the from block as a input of Trial_Control. To get the x y value of home position, can i just make x position=target_table[1][1] or x position=target_table[1][col_x] to get the x value of home?(assume the home target is in the first row of target table)
1 Answers
Koloman Varady Staff answered 4 years ago
In Trial_Control (which is a C based Stateflow block), the default array numbering is 0 based (this is unlike the rest of Simulink, which is 1 based). For it to work the way you're describing (and I recommend you do this), open up Model Explorer and click on Trial_Control. Then select target_table and click on the Description tab and set First Index to 1. I've attached a diagram to help you navigate (the option is placed quite out of the way, in my opinion)
Yihui Xu replied 4 years ago

thank you! but after that how can i get the value of x and y? just call x=Target_Table[1][1] and y=Target_Table[1][2]?

Koloman Varady Staff replied 4 years ago

Yep – that will get you the first row x and y.