Translated with www.DeepL.com/Translator
Hi Luc,
You can loop through your 2D variable and use the OUTPUT, and PRINT keyword to save its values to a text file.
Additionally, you might want to use the CONVERTFILEFORMAT keyword to change the text file encoding to ANSI, which is more suited to MATLAB.
Here is an example of such a macro:
This macro should create a text file in C:\temp\ called MY_ARRAY.TXT, and should look as follow:
Remark: these numbers are integers, but they have been written with the default OUTPUT settings, which uses 4 decimals. You can change the OUTPUT format using the FORMAT keyword (I've added this for completeness).
There are then multiple ways of reading this text file in MATLAB, here is one:
Does that answer your question?
Have a great day.
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.