How to create a vector in simulink? I have given an input which has 2 values, one is flow and another is temperature. I don't know how to simulate this model, Kindly, help me

97 views (last 30 days)
  1 Comment
Akshay Chakrapani
Akshay Chakrapani on 4 Sep 2022
The input and output from each systems are a vector which has 2 values(flow and temperature). I want to know how to put the vector in the model for the simulations. As of now the values that are to be taken for simulation can be 1

Sign in to comment.

Answers (1)

Paul
Paul on 4 Sep 2022
Vector signals are commonly created in one of two ways.
Define the parameters of any source block such that it ouputs a vector signal. That vector signal then propogates downstream. For example, setting the Amplitude parameter of the Sine Wave block to [1 2] wll cause the ouptut to be a vector signal of time with two sine waves, the first the amplitude 1 and the second with amplitude 2.
Or, use the Mux block to comonbine two or more signals (scalar or vectors) into a vector ouput that propagates downstream.
If neither of these are the solution, more info will be needed on the specific problem.
  6 Comments
Paul
Paul on 5 Sep 2022
Yes, the output of the inport should have two elements. As previously stated, the way to ensure that depends on whether the inport is in the top level of the model or in a subsystem. I can't show how to do that because I don't know enough about the model.
When it's all hooked together correclty, y will also have two elements. I don't think anything in particular will need to be done for that.

Sign in to comment.

Categories

Find more on Modeling in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!