Info
Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.
How to modify the "Constant" block output to be same kind as "From Workspace" block output
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Astarag Chattopadhyay
am 16 Mai 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.
Antworten (0)
Diese Frage ist geschlossen.
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!