フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to modify the "Constant" block output to be same kind as "From Workspace" block output

1 回表示 (過去 30 日間)
Valkmi
Valkmi 2017 年 5 月 11 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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
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!

Translated by