Extract data from file and split using Demux in simulink

조회 수: 3 (최근 30일)
Joe Ajay
Joe Ajay 2013년 6월 19일
Hi,, I've a small problem with demux. My data comes from an external '.mat' file (it is 2X20 data, I checked it when I opened the '.mat' file matlab). Now I have to extract the 2nd row data. And I want it split, like first five elements, next five etc., So I used Demux and entered the vector [5 5 5 5]. and I get the following err.
_*First error:
Invalid setting for input port dimensions of 'call_stats_block2/Demux'. The dimensions are being set to 1 This is not valid because the total number of input and output elements are not the same
Second err:
Error in port widths or dimensions. Output port 1 of 'call_stats_block2/From File' is a one dimensional vector with 1 elements.* _
Is there any simple way to get data from file and split the same. Guys plz help, scratching my head for long time....

답변 (1개)

Kaustubha Govind
Kaustubha Govind 2013년 6월 19일
So does that mean you need to split your data into 8 parts (since you have a total of 40 elements in your imported signal)? If yes, enter "Number of outputs" as 8 on the Demux block's dialog.
  댓글 수: 1
Joe Ajay
Joe Ajay 2013년 6월 19일
Tanx fr the response, actually I need first 5 elements of 2nd row and it next 5 of 2nd row...goes like that.And if u see the 2nd error it is still more confusing..Hw come when opened wit matlab it shows 2X20 array but give err as only 1 element is present.

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by