How to create and empty matrix of a given size in a way that is compatible with codegen
Mostrar comentarios más antiguos
I have a function that is writing to an output matrix (y).
I can create y in the function using:
y = zeros(size(x));
x is a variable size large array and using zeros() is inefficient because it initializes the array with zeros that are then going to be overwritten.
I was wondering if there is a way to do this more efficiently?
I've tried a lot of the options I can find so far but none are compatible with codegen.
Thanks very much, as always,
John
2 comentarios
KSSV
el 11 de Mayo de 2022
You want to initialize and then do what?
John Edwards
el 11 de Mayo de 2022
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Function Definition en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!