toolbox_graph

4 次查看(过去 30 天)
dr.rab
dr.rab 2012-2-21
回答: Leepakshi 2025-2-28
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

回答(1 个)

Leepakshi
Leepakshi 2025-2-28
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.

类别

Help CenterFile Exchange 中查找有关 Resizing and Reshaping Matrices 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by