Problem with matlab function block.
Mostrar comentarios más antiguos
I use a matlab function block in my simulink model and when i read a variable(for example N) from a file i get an error, but if i write N=2 it works fine. The problem is that i have to read this variable from a file. The error is : "Computed maximum size is not bounded. Static memory allocation requires all sizes to be bounded. The computed size is [:? x 1] Function 'MATLAB Function' : B=zeros(N,1,'double')". Any ideas are welcome. Thank you in advance.
Respuesta aceptada
Más respuestas (1)
Walter Roberson
el 5 de Feb. de 2012
0 votos
You will need to allocate the memory first with a fixed maximum size, and then if you find that N is smaller than that size you can delete the extra storage from the array.
Categorías
Más información sobre Texas Instruments C2000 Processors en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!