index in position 1 error
2 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 26 Ago 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.
Risposte (0)
Vedere anche
Categorie
Scopri di più su Wind Power in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!