필터 지우기
필터 지우기

Input an array to a transfer function in Simulink?

조회 수: 9 (최근 30일)
Claire Parker
Claire Parker 2017년 7월 30일
답변: Ramanuja Jagannathan 2017년 8월 2일
I am designing a low pass and high pass filter system. To do this, I have added two transfer functions in Simulink. However, when I try to run the simulink model, it says that I cannot input my array into the transfer function. The array has 800000 elements and all are double type (which is the specified time). I'd like to end up with an array at the end as well. How can I use my array as an input to the transfer function?
  댓글 수: 1
Swarooph
Swarooph 2017년 7월 31일
Is it an array that you want to pass as input or a time series so each array element corresponds to some time of the signal?

댓글을 달려면 로그인하십시오.

답변 (1개)

Ramanuja Jagannathan
Ramanuja Jagannathan 2017년 8월 2일
I assume the array that you have used for sending the signal data to the filter is of the size 800,000 elements. Hence to import the array into the Simulink model, the "From Workspace" block could be utilized. In the "From Workspace" block, it is required that data must be appended with the corresponding timestamp details. So, create a corresponding time array as shown below:
>> t = linspace(start_time,end_time,length(data)) // assuming 'data' being the name of your input data array
In the "From Workspace" block, under data field enter
[t data]
In order to obtain the result in an array format, connect the "To Workspace" block at the desired output and change the format to "Array".

카테고리

Help CenterFile Exchange에서 Modeling에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by