how to find a output value at time t for a input value at time t in simulink

조회 수: 30 (최근 30일)
I am simulating a model where i need to measure continuous values of output variable Y which im going to use as my feedback to a function block. The inputs to the function block are the output variable Y and and input variable X. Both the values keep fluctuating. I want to find the output value Y at a particular time t at which the input value X shows a constant value z.
For example: The input values keep increasing initially X=(1 2 3 4 5 6 7 8 9 ...). I want to find the output value Y at the time where X shows 7. Please note im doing this in simulink.
How can i do this?
Thank You
  댓글 수: 1
Raj
Raj 2019년 7월 3일
I am not sure If i understand your question correctly. To me, it looks like you want to get your output value at a particular value of input. That's it. You can easily do this is just by connecting both to a scope and get overlapping plots. You can find the output values at any given value of input. Is this what you are looking for?

댓글을 달려면 로그인하십시오.

답변 (1개)

Jalaj Gambhir
Jalaj Gambhir 2019년 7월 17일
Hi,
From what is assumed, you want to analyze and use the values of the input (X) and the output (Y). This can be done by adding a scope block to visualize the output as well as log them into your workspace for further use.
After adding a scope block, open the same, and go to View --> Configuration Properties. Modify the number of input ports as required (2 in your case). In the ‘Logging’ tab, check the ‘Log data to workspace’ checkbox and provide the output variable name and the save format. Save the changes.
After pressing the ‘Run’ button, a variable will be created in your base workspace with the provided name. You can access the values by ‘out.ScopeData.signals(1).values’ or out.ScopeData.signals(2).values (if default name was provided in the ‘Logging’ tab). These values can be further used as required.

카테고리

Help CenterFile Exchange에서 View and Analyze Simulation Results에 대해 자세히 알아보기

태그

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by