index in position 1 error

조회 수: 2 (최근 30일)
Matt Thomas
Matt Thomas 2023년 8월 26일
댓글: Matt Thomas 2023년 8월 27일
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