Info
此问题已关闭。 请重新打开它进行编辑或回答。
How to modify the "Constant" block output to be same kind as "From Workspace" block output
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
Astarag Chattopadhyay
2017-5-16
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.
回答(0 个)
此问题已关闭。
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!