OpenFAST / matlab-toolbox

Collection of Matlab tools developed for use with OpenFAST
Apache License 2.0
50 stars 67 forks source link

upload output file to matlab #44

Closed falascao closed 9 months ago

falascao commented 9 months ago

Dear openfast team, i wanted to ask you what's the procedure to upload the output file generated from the openfast simulation in Matlab. Thank you

jjonkman commented 9 months ago

Dear @falascao,

See MATLAB Toolbox functions ReadFASTtext.m for ASCII-formmated OpenFAST output files or ReadFASTbinary.m for binary-formatted OpenFAST output files: https://github.com/OpenFAST/matlab-toolbox/tree/main/Utilities.

Best regards,

falascao commented 9 months ago

Dear @jjonkman, i had download the matlab toolbox folder and i set his path in Matlab; but when i try to open openfast's files like .out and .outb, Matlab open the file in text mode. Doing that, the matlab's workspace is empty and don't load the data.

Best regards and thank you for your help.

jjonkman commented 9 months ago

Dear @falascao,

I'm not sure what you mean when you say:

but when i try to open openfast's files like .out and .outb, Matlab open the file in text mode.

Can you clarify or share a screenshot of the issue?

Best regards,

falascao commented 9 months ago

Dear @jjonkman, this is the screenshot

WhatsApp Image 2023-10-12 at 17 08 36 68) WhatsApp Image 2023-10-12 at 16 55 39 WhatsApp Image 2023-10-12 at 16 57 13 WhatsApp Image 2023-10-12 at 16 55 19

bjonkman commented 9 months ago

To read the files, you need to use the functions Jason mentioned. For example, to read the binary .outb file, you call [Channels, ChannelNames, ChannelUnits] = ReadFASTbinary('5MW_OC4Semi_Linear.outb') from the Matlab command window, and the data from the file will be stored in the function's output variables.

falascao commented 9 months ago

Everything works perfectly. Thank you so much for your support. Best regards