Embedded matlab function error..
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How to resolve this type of errors?/
---------------------------------
Computed maximum size of the output of function 'colon' is not bounded. Static memory allocation requires all sizes to be bounded. The computed size is [1 x :?].
-------------------------------------
0 Kommentare
Akzeptierte Antwort
Kaustubha Govind
am 8 Feb. 2012
It looks like you are trying to create a variable whose size is dynamic. For example:
function y = myfun(n)
y = zeros(1,n);
Since Embedded MATLAB uses static memory allocation, it cannot handle variables that change size dynamically. What you can do is declare 'y' as variable-sized while specifying an upper bound for the size.
function y = myfun(n)
coder.varsize('y', [1 1024]); %n must never exceed 1024
y = zeros(1,n);
2 Kommentare
Kaustubha Govind
am 9 Feb. 2012
Does it point to a specific line? I can see several lines where you are creating variables of dynamic size:
data=sign(randn(N,1))';
data1=ones(T/Ts,1)*data;
tiq = [0:Ts*2:(N*T)-Ts]';
bs1=data(1:2:length(data));
symbols=ones(T/Ts,1)*bs1;
bs2=data(2:2:length(data));
symbols1=ones(T/Ts,1)*bs2;
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Characters and Strings finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!