davidvarga / MBeautifier

MBeautifier is a MATLAB source code formatter, beautifier. It can be used directly in the MATLAB Editor and it is configurable.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Index exceeds matrix dimensions.

homocomputeris opened this issue · comments

When applied to testfile.m the following errors appear in MATLAB 2016a on Linux:

Index exceeds matrix dimensions.

Error in MBeautify/performFormatting>processContainer (line 559)
    indexes = find([containerBorderIndexes{:, 2}] == maxDepth, 2);

Error in MBeautify/performFormatting>performReplacementsSingleLine (line 362)
[data, arrayMapCell] = processContainer(data, settingConf);

Error in MBeautify/performFormatting>performReplacements (line 151)
actCodeTemp = performReplacementsSingleLine(actCodeTemp, settingConf);

Error in MBeautify/performFormatting (line 91)
    actCodeFinal = performReplacements(actCode, settingConf);

Error in MBeautify.beautify (line 18)
formattedSource = MBeautify.performFormatting(codeToFormat, settingConf);

I have also noticed this. The fix csn be expected this evening along with additional updates.

The reason was the difference between R2013b and R2016a. I usually use R2013b, now I tried it and fixed it on R2015b.