필터 지우기
필터 지우기

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