Thank you for the replyYou'll probably want to represent your data as a frame. Can you give some more detail on what you're trying to do?
Thank you for the inputAhh, ok. Take a look at the "Selector" block in the Simulink library under "Signal Routing". You can use this block to manipulate data in and out of the array.
I don't think I can do that. I have determine which is valid first because some calculated angles may exceed the robot's limits. Also, it must be efficient, too. I don't know what else I can do about itI would modify your function to output the possible angles one at a time.
Because I am using a data acquisiton board to read the position of the arm and to send signals to the arm, so I can only use real-time windows target in Simulink to do itWhy do you need to use Simulink? It sounds like an m-function would be the best way to handle your data.
Have you considered using an Embedded Matlab Function (available under "User-Defined Functions")?Hi all,
I am working on project using simulink, but I can't access the elements in the array in the user-defined block the way I do in m-file. Is there anyway I can access the elements in an array in Simulink? Thank you
Hi Dave,Have you considered using an Embedded Matlab Function (available under "User-Defined Functions")?
This implements a standard Matlab M-file function through which you can pass arguments to and retrieve arguments from. The M-code can interrogate the array.
Without knowing a little about your system/model I cannot suggest much more.
Dave
No problem.Hi Dave,
Thank you so much for your help!
I can't try anything yet because my computer is down. I will try it when I get my computer back and let you know asap. Thank you so much
Po
by Jake Hertz
by Jeff Child
by Aaron Carman