Gate diagram in Simulink

조회 수: 2 (최근 30일)
John Barton
John Barton 2023년 6월 5일
답변: Bhanu Prakash 2024년 7월 19일
I'm trying to make the following diagram in the simulink but there are some problems I encountered.
1) You can't have a line to somewhere when not connected
2) There are no logical buffers from what I've searched
3) don't know how to merge 2 lines together
If you know how to do this I would appreciate the help.

답변 (1개)

Bhanu Prakash
Bhanu Prakash 2024년 7월 19일
Hi John,
Please find below the workaround for the questions asked:
1. Unconnected lines
Yes, you can't have a line unconnected in Simulink. To work around this issue, there are several blocks in Simulink that you can use based on your use case::
  • To pass the inputs (A0, A1, A2, C, D, E) to the design/model, you can either use a 'Constant' block or a 'From Workspace' block (if you want to pass the inputs from the MATLAB workspace).
  • The output 'Q7' can be connected to a 'Display' block (to display the value), a 'To Workspace' block (to store its value in the MATLAB workspace), or a 'Terminator' block (to terminate any unconnected output port).
2. Logical buffers
To replicate the functionality of a digital buffer, you can either use the 'Unit Delay' or the 'Memory' block in Simulink, depending on your use case.
3. Merge two lines
In Simulink, you can merge two wires only when the first wire is properly connected between two blocks. To merge two wires, you need to first connect two blocks with wire-1, place a third block to which wire-2 needs to be connected, and then connect the two wires.
You can refer to the following image to merge two wires:
For further information regarding the blocks mentioned, you can refer to the following documentation links:
Apart from these Simulink blocks, there are several others that you can use. You can search and use the required blocks from the following list:
Hope this helps!

카테고리

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

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by