필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Embeded MATLAB function variable-size signal

조회 수: 3 (최근 30일)
Daniel
Daniel 2014년 1월 10일
댓글: Kaustubha Govind 2014년 3월 18일
Hello all
I am simulating something on simulink that requires me to take some number as an input then
generate variable size output signal.
For example, say I have input that says 2, 14, 10.
I am supposed to create [1 by 2] vector then, [1 by 14] vector then, [1 by 10] and so on..
I know that my output variable will not exceed [1 by 10000], so I was trying to define inside function just to see if it works:
function y = fcn(u)
%#codegen
coder.varsize('y', [1 10000]);
y = zeros(u, 1);
I also went to simulink->Edit Data then check my variable y to be variable size and I specified [1 10000], but
still it gives me an error saying:
Computed maximum size is not bounded.
Static memory allocation requires all sizes to be bounded.
The computed size is [:1 x ?].
  댓글 수: 2
Kaustubha Govind
Kaustubha Govind 2014년 3월 18일
Perhaps you intended to say y = zeros(1, u) and not y = zeros(u, 1)?

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by