Problem in Running fx_mbc3 and fx_getMats

Dear All,
Can anyone help me please with the following.

I am tring to use the MBC matlab-toolbox to process the openfast linearization file. But when I run “fx_getMats” in MATLAB it gives error as follows,

FileNames={‘3.1.lin’};
[MBC, matData, FAST_linData] = fx_mbc3( FileNames )

Running mbc3 (v2.0, 29-Jan-2018)

Reference to non-existent field ‘n_x2’.

Error in fx_getMats (line 49)
matData.NumStates2 = data(matData.NAzimStep).n_x2;

Error in fx_mbc3 (line 41)
[matData, FAST_linData] = fx_getMats(FileNames);

Dear Shijing,

When did you last updated MBC3? We recently updated MBC3 (now included in the MATLAB Toolbox). Does using the newest master of MBC3 from the MATLAB Toolbox solve your problem: github.com/OpenFAST/matlab-toolbox?

Best regards,

Dear Jason,
I used the newest master of MBC3 from the MATLAB Toolbox just as the same address as you shown, and encountered that problem. I would like to send you my .lin file, and could you help me to find what’s wrong with my linearization file?
Campbell.1.txt (19.1 KB)

I have run the Matlab code with the file you attached, and it runs. I did notice a problem with how it reads the rotating frame column (i.e., it assumes nothing is in the rotating frame with this version of the .lin file), so I’ve submitted a pull request for that here: github.com/OpenFAST/matlab-toolbox/pull/9.

However, I did not get the error about the non-existent field ‘n_x2’. I am wondering if you have an old copy of any of the files on your Matlab path. If you type which ReadFASTlinear or which fx_getMats at a Matlab command prompt, what does it tell you? Are they both using the version of the code that is associated with the OpenFAST/matlab-toolbox hash 3de85f09861e3f3bf7dcb3e86eb6052e96d79255?

Dear Bonnie,

Thank you for your replying. I checked the matlab-toolbox again and I found the old version ReadFASTlinear is used. It runs now and out put the Excel file.

However, 1) fx_mbc3 runs wiht a WARNING: Number of blades is 0, not 3. MBC transformation was not performed. How to deal with it?
2) I don’t konw how to interpret the output, I am not really sure which frequency belongs to which DOF. I am sorry for this simple question, since I am new to use the fast. I would appreciate it if you could spare some time to help. Thanks in advance. :slight_smile:

Dear Shijing Xu,

The first WARNING should be solved by using the updated version of ReadFASTLinear.m from Bonnie’s recent pull request (github.com/OpenFAST/matlab-toolbox/pull/9).

Regarding the interpretation of the MBC3 output, this topic has been discussed many times on this forum. Search for “MBC3 interpret” or similar on this forum to review what has been discussed already.

Best regards,