how to find a output value at time t for a input value at time t in simulink
9 次查看(过去 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
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
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulink Functions 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!