index in position 1 error
2 次查看(过去 30 天)
显示 更早的评论
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
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.
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!