Info
This question is closed. Reopen it to edit or answer.
How to modify the "Constant" block output to be same kind as "From Workspace" block output
2 views (last 30 days)
Show older comments
Hey again!
Another problem with Simulink; I get my model working with "From Workspace" blocks that grabs a variable from workspace that is a Nx2 matrix, the first column being timestamp of 1:length(N).
If I remove the timestamp from the Nx2 matrix and grab the same matrix (Nx1) with "Constant" block the output is a vector of 1:length(N). With what blocks I can modify this output of the constant block to be the same kind as the output of the "From Workspace" that grabs Nx2 matrix? I've been trying a lot of methods for example creating a custom "MATLAB function" that creates the timestamp of 1:length(N) but I'm very new to this and could really use some help!
Assume you have the constant block with [1:5:50] output connected to a scope. Set the simulation time to 5 and run the simulation. The scope shows vertical lines at every value of the constant block for the simulation time 5. How could I modify the signal from the constant block to act like scalar at sample time 1 so the scope would look like: time = 1 output = 1, time = 2 output = 6, time = 3 output = 11...
Thank you!
1 Comment
Astarag Chattopadhyay
on 16 May 2017
Hi,
Could you please share the model you are using to reproduce the issue along with the screenshot of the output of the 'Scope' block, that will help all of us to understand the query better.
Answers (0)
This question is closed.
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!