toolbox_graph

4 visualizaciones (últimos 30 días)
dr.rab
dr.rab el 21 de Feb. de 2012
Respondida: Leepakshi el 28 de Feb. de 2025
when I try to use toolbox_graph to read .wrl file using read_wrl I have the error message in reshape function size arguments must be real integer the error line is reshape(face,length(face)/7)+1 because of /7 how can i fix this error? thanks

Respuestas (1)

Leepakshi
Leepakshi el 28 de Feb. de 2025
Hi,
To fix the error, ensure that the length of face is a multiple of 7 before using it in the reshape function. Use integer division to avoid non-integer size arguments:
% Check if the length of 'face' is a multiple of 7
if mod(length(face), 7) ~= 0
error('The length of face is not a multiple of 7. Please check your data.');
end
% Proceed with reshaping using integer division
face_reshaped = reshape(face, [], 7) + 1;
It should resolve the issue.

Categorías

Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by