# SimMechanics Motion problem

조회 수: 1 (최근 30일)
Tomás 2012년 4월 15일
답변: Steve Miller 2023년 5월 10일
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없음 표시없음 숨기기
David 2012년 10월 12일
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 2012년 10월 12일
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.

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Steve Miller 2023년 5월 10일
--Steve

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

Translated by