How do I identify the exact string to use to programmatically configure a Simscape component's parameters when instantiating it?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
I'm trying to import SPICE subcircuits into Simscape using subcircuit2ssc(). After looking at the unsupportedCommands output (see function's documentation page), I have some incompatible lines in my netlist. I've found a Simscape block to model the behavior that it complained about, so now I need to instantiate it in a component declaration inside the .ssc file that subcircuit2ssc() produced. The problem is that I don't know the exact string to use to refer to that parameter in the instantiation function call. I can open the the block's properties window or that block's help browser's page and see the full text description of the parameters, but I doubt that's what I need. For example, a resistor will have a "Resistance" parameter, but programmatically assigning it a value in the instantiation function would be done via the "R" value (i.e. "R = { (1*1000), 'Ohm'}).
Since I will most likely need to identify this information in other cases, I'm asking for the method, not just the exact string for this specific component.
The specific block I'm trying to instantiate, in this case, is a transmission line in Simscape > Electrical > Passive > Lines. Since this block has different "Model Types" with different parameters available for each model type, my question has two parts:
- For blocks with multiple "Model Type" options, how can I list the types and the short version of their names?
- If it's not already part of the answer to #1, how can I list the short parameter names associated with each Model Type? Using the resistor example, I need to know that resistance is a parameter and that assigning a value to "R" is the way to configure it.
I found the .sscp files in my Matlab installation, but they're protected so I can't just read it that way. I've tried calling the instantiation function to ask for information (i.e. "ee.passive.lines.transmission_line( help ), etc.) but that doesn't work. Just instantiating it via the command window (unsuppressed output) doesn't list the parameters either.
0 Kommentare
Akzeptierte Antwort
David John
am 23 Mai 2022
If you let your mouse hover over a parameter in the block mask, the programmatic name should appear.
0 Kommentare
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu Composite Components finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!