I need to connect physical modelling connection port to the output of a switch with 2 input. How can I establish this?

4 vues (au cours des 30 derniers jours)

Réponses (1)

Umar
Umar le 13 Juil 2024
Hi Shelma,
Place a Signal Routing block (e.g., Mux block) after the switch.Connect the output of the switch to the Signal Routing block. Then, connect the desired input port of the physical modeling connection block to the Signal Routing block.
  4 commentaires
Shelma George
Shelma George le 28 Juil 2024
Not able to connect between signal conversion block and physical modelling connection block
Umar
Umar le 28 Juil 2024
Hi Shelma,
Make sure that the output data types are compatible. Check the data types of the signals being passed between these blocks. If there is a mismatch, you may need to use data type conversion blocks like Data Type Conversion or Data Type Duplicate to ensure compatibility. Here is an example of how you can connect the Signal Conversion block to the Physical Modeling Connection block in Matlab:
% Create a Signal Conversion block
signalConversionBlock = Simulink.BlockDiagram.addBlock('built-in/Signal
Conversion', 'YourModel/SignalConversionBlock');
% Connect the output of the Mux block to the Signal Conversion block
add_line('YourModel', 'MuxBlock/1', 'SignalConversionBlock/1');
% Create a Physical Modeling Connection block
physicalModelingBlock = Simulink.BlockDiagram.addBlock('built-in/Physical
Modeling Connection', 'YourModel/PhysicalModelingBlock');
% Connect the Signal Conversion block to the Physical Modeling Connection block
add_line('YourModel', 'SignalConversionBlock/1', 'PhysicalModelingBlock/1');
By ensuring data type compatibility and following the correct block connections, you should be able to successfully link the Signal Conversion block to the Physical Modeling Connection block in Matlab.

Connectez-vous pour commenter.

Catégories

En savoir plus sur Prepare Model Inputs and Outputs dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by