Size mismatch using reshape in HDL Coder
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Alla
el 2 de Nov. de 2018
Comentada: Bharath Venkataraman
el 2 de Nov. de 2018
I have an 8x8 input matrix, since 2D matrices aren't supproted I reshape it to 64x1 for the input and then reshape it back within the function using A=reshape(A, 8, 8); it runs well in Matlab but the code generation spits out this error:
Size mismatch (size [64 x 1] ~= size [8 x 8]). The size to the left is the size of the left-hand side of the assignment.
What's odd is that the problem seems to have came out of nowhere because I'm almost certain It was working well and I didn't change anything then it just started to error.
0 comentarios
Respuesta aceptada
Bharath Venkataraman
el 2 de Nov. de 2018
Could you try assigning the value to a different variable rather than back to A. Ar = reshape(A,8,8);
use Ar in the code below.
2 comentarios
Bharath Venkataraman
el 2 de Nov. de 2018
Yes, all sub-functions should also be covered by HDL Coder.
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!