필터 지우기
필터 지우기

Request to help in sorting an error in simulink

조회 수: 1 (최근 30일)
SANTOSH
SANTOSH 2013년 1월 21일
Hi in my project while transferring data from 1 functional block to another i encountered the below error, where if i run the code in matlab err1 has data but if i run in simulink it is displaying following error please help me Thanks in advance
"Inferred size for data 'err1' (#59) is empty, which is invalid for a Simulink signal."
  댓글 수: 1
Kaustubha Govind
Kaustubha Govind 2013년 1월 21일
I'm assuming this is in a MATLAB Function block? How does your MATLAB code in the block define 'err1'?

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

채택된 답변

Walter Roberson
Walter Roberson 2013년 1월 21일
You could get that if your code builds up "err1" dynamically, something like
err1 = [];
for K = 1 : 10
err1 = [err1 K];
end
Instead you should allocate err1 as the maximum size immediately on the first assignment to it. I seem to recall that you can reduce the size later, but not increase it.

추가 답변 (0개)

카테고리

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