Dear Abaqus2Matlab developers,
While running the truss optimisation example, I encountered this error:
Error using textscan
CollectOuput must be a numeric scalar.
I was able to run the verification tests, thought.
Thanks for your time.
Phu
If using this toolbox for research or industrial purposes, please cite:
Advances in Engineering Software. Vol 105. March 2017. Pages 9-16. (2017)
You are welcome Phu!
The option for different path separators ('\' and '/') will be considered in a future version of Abaqus2Matlab.
Best,
George
Thanks a lot Georgeo. That solved my issue. I have a small comment: as I am using a Linux machine, I had to change '\' to '/' in the filenames. It would be great if you could make modifications so that your toolbox works for any OS.
Bests,
Phu
Hello Phu,
Hope you are fine.
The issue that you describe appeared in a previous version of Abaqus2Matlab. More specifically, in the latest Matlab versions, the 'CollectOutput' parameter in the textscan function takes the values 0 (false) or 1 (true), whereas in the earlier Matlab versions the same parameter took the values '0' (false) or '1' (true). To ensure compatibility of Abaqus2Matlab with both the old and the new syntax, the Fil2str.m function has been modified by replacing:
C = textscan (fileID, '%s', 'CollectOutput', '1', 'delimiter', '','whitespace','','endofline','');
with:
try
C = textscan (fileID, '%s', 'CollectOutput', '1', 'delimiter', '','whitespace','','endofline','');
catch
C = textscan (fileID, '%s', 'CollectOutput', 1 , 'delimiter', '','whitespace','','endofline','');
end
namely if the try statement gives an error (which occurs for users of newer Matlab versions), then the catch statement is executed giving the correct result. Thus the issue was successfully resolved. The Fil2str.m function, as it has been currently uploaded at the downloads tab, or equally at https://www.mathworks.com/matlabcentral/fileexchange/54919-abaqus2matlab and also at https://www.researchgate.net/publication/312085009_Abaqus2Matlab is updated with the above modification.
You are advised to download the newest version of Abaqus2Matlab and replace your old files with the new ones, to avoid this and other errors during your postprocessing tasks. Apart from this, please be aware that the Abaqus2Matlab toolbox is constantly improving and kept in pace with the latest trends in both Abaqus and Matlab software, so you should also keep yourself constantly updated.
If any other issues appear during the usage of Abaqus2Matlab, you are highly encouraged to contact the Abaqus2Matlab work team in order to find solutions to your problems, give some feedback for further improvements, or even share your experience with the toolbox.
Best regards,
George