index in position 1 error

2 次查看(过去 30 天)
Matt Thomas
Matt Thomas 2023-8-26
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 个评论
Walter Roberson
Walter Roberson 2023-8-26
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 2023-8-27
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:)

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Wind Power 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by