Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.


pietro
Posts:
374
Registered:
1/3/09


Re: simmechanics:
Posted:
Nov 16, 2012 6:28 AM


"Tony" wrote in message <k83sbm$6gq$1@newscl01ah.mathworks.com>... > Hi Michele, > > I think I see what you want to do. If you have two or more subsystems that rely on the same parameter, you can define that parameter in the model workspace. This applies not only to geometry but also inertia, color, force constants, joint state targets, etc. In other words, you can use this approach for almost any situation where two different blocks rely on a common parameter. > > To use the model workspace: > > 1. Click Tools > Model Explorer > 2. In the Model Hierarchy pane, click the name of your model, and then click "Model Workspace" > 4. On the right side of Model Explorer, look for bold letters that say "Model Workspace". > 5. In the Data Source dropdown menu, select "MATLAB Code". > 6. A big white rectangle shows up. Use it to define your common parameters, and click "Reinitialize from Source" to apply the changes to the model. > > Let me know if that works! >  Tony > > "pietro " <bracardi82@email.it> wrote in message <k83ofn$mpn$1@newscl01ah.mathworks.com>... > > Hi all, > > > > I'm creating a mechanism with simmechanics second generation libraries, that it is composed of several compounds body and the dimesion of each body is related to the length of one body (i.e. body_length). I created a body and I parameterized it through the creation of a subsystem and a mask. Now I have to create the second body, but I don't know to make the length of the first body as global so the second body can see it. > > Hopefully to have explained correctly my question, if not, don't hesitate to ask me something. > > > > Best regards > > > > Michele
Hi Tony,
thanks for your reply. It works but: 1 the dimension of each element of a body is connected to the parameters with some formulas, many of them are not straightforward ones. To reuse all bodies in other models, I need to inizialize the body length in the subsystem and not in the model workspace. How could I do that? 2 I start the simulation in a objective function. How can I change the paramater though it?
Thanks
Best regards
Pietro



