# Extract information from transfer function matrix using parameter names?

Posted 6 months ago
591 Views
|
4 Replies
|
2 Total Likes
|
 Dear all,As shown in the picture below I have a transfer function matrix with one input (DisplacementGround) and two outputs (DisplacementMass and VelocityMass). I can access either one of the two elements of the matrix using SystemModelExtract and referring to the elements as {1}, {1} and {1},{2}.However, it would be very useful to be able to extract the individual transfer functions using the actual names of the input and output quantities (e.g. DisplscementGround in this example). These names come from a Modelica model imported into Mathematica.Is there a way to achieve it?Thank you very much in advance.Fabian
4 Replies
Sort By:
Posted 6 months ago
 Fabian,I do not know of a way to do this with the built in commands, However, you can easily write your own.You can get the labels with this command: labels = Cases[model , Rule[SystemsModelLabels, lst_] -> lst][[1]] From this you can create your own mySystemsModelExtract that finds the labels in the list of labels above (by Position) and feeds that to the SystemsModelExtract function. You need to decide on a syntax for your command but it should work well.Regards,Neil
Posted 6 months ago
 Dear Neil,Thank you very much for your answer. It does work very well. I still have a question. I don't understand how the values of SystemsModelLabels become accessible through the command Rule[SystemsModelLabels, lst_], which seems to be a replacement rule. Is this a way to go around a ReadProtected attribute?Would you mind explaining, please?Thank you in advance again.Fabian
 Dear Neil,Thank you very much indeed for your explanation.After seeing the FullForm of the transfer function I understood what you did.Regards,Fabian