index in position 1 error

1 view (last 30 days)
Matt Thomas
Matt Thomas on 26 Aug 2023
Commented: Matt Thomas on 27 Aug 2023
I keep running into this issue and im not sure how to fix it. I am not a programmer or a coder at all. I do not write code. I am using a script that is supposed to calculate the extreames of a wind turbine file i made.
The file has 52 channel names (52x1)
and the time series data is a 52x2 and has 48,000 time steps
when i run the following:
settingsFile = 'mysettings.mext'
MExtremes( settingsFile );
Reading "5MW_Land_DLL_WTurb.out" (26.231474 MB).
Rows=48001, Cols=54
Done
Index in position 1 exceeds array bounds. Index must not exceed 54.
Error in ProcessExtremes (line 254)
[~,Results.MinInds(iChan)] = min(ChanMinAssocValues(AllEEvChans(iChan),AllEEvChans(iChan),:));
Error in MExtremes (line 101)
[Results, errStat, errMsg] = ProcessExtremes(Settings.nEEvChans, Settings.AllEEvChans, FileInfo.ChanNames, ChanMinAssocValues, ChanMaxAssocValues, FileInfo.NumDLCs, FileInfo.DLCs, FileInfo.DLCMask, FileInfo.BinEvents, ElapsedTime, Settings.WSmin, Settings.WSmax, Settings.WSMaxBinSize, FileMeanWindSpeed);
in case you need the users guiade, which i tried to follow as best as i could haha
any help is much appreciated
  3 Comments
Walter Roberson
Walter Roberson on 26 Aug 2023
I would recommend putting in a breakpoint at line 254 of ProcessExtremes and run the code until there. When it gets there, check the value of iChan and the size of AllEEvChans, and compare the value of AllEEVChans(iChan) to the size of ChanMinAssocValues . Also you should whos min just in case that someone assigned min as a variable instead of as a function.
Matt Thomas
Matt Thomas on 27 Aug 2023
ok, thank you Walter. I will check it out and see what i can find. thanks for that tip.
Image analyst. I will see if i can contct the auther, might be difficult, but i will check:)

Sign in to comment.

Answers (0)

Categories

Find more on Wind Power in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!