MATLAB: The command legend in R2016b does not work like in R2013b

legendr2013br2016b

I got an old GUI and programm from my boss, which does only work with R2013b for some reason. Since I did not programm it myself, I have to go through every line and search for errors.
One of the lines which seems to work fine with 2013b but not with my 2016b version is the following:
legend1=legend(hpl(:),-1);
hpl is in this a 1×9 vector. Does anyone have an idea, why this line does only work in 2013b and what it even should do?

Best Answer

The -1 needs to be recoded as 'Position', 'NorthEastOutside'
Related Question