# SimMechanics Motion problem

1 visualizzazione (ultimi 30 giorni)
Tomás il 15 Apr 2012
Risposto: Steve Miller il 10 Mag 2023
Good Afternoon, I'm trying to simulate the motion of a robot for a project in the university. I've already calculated the angular inputs for the hip and knee joints. I have those values in matrix format and would like to input them into simmechanics in order to provide motion instructions. I have created two derivatives to obtain the angular velocity and angular acceleration using the values introduced by the precalculated matrix of angular positions. Happens that when inputting that matrix simmechanics gives me "Error in port widths or dimensions. Output port 1 of 'robo_1_v3/Mux2' is a [30003x1] matrix.". Can you give me some clue about how can I deal with inputting pre calculated matrix in simmechanics simulation? Thank you in advance for your help.
##### 2 CommentiMostra NessunoNascondi Nessuno
David il 12 Ott 2012
Hi Tomas.
Good morning, I have been working on SimMechanics and I encountered the same problem as you said, I wonder if I fix you, and ask that you please guide me a little so I fix mine.
thanks
Rozo David Osorio
Tomás il 12 Ott 2012
Good afternoon David, After that initial attempt I solved my problem in a different way. There are multiple ways to import data to simmechanics, you can use simulink timeseries(my first option) or you can create your own matrix. What I've done is that I created a matrix with the time increments in the first column, then I entered the joint values in the second column. You must be sure that the number of lines is the same for time and angle positions. Then you can use the "from workspace" block to input the matrix. I hope this helps, if not I am able to help you more just send me a message or reply to this message and we'll figure out a way to solve your problem.

Accedi per commentare.

### Risposte (1)

Steve Miller il 10 Mag 2023
--Steve
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Assembly in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by