sunghoon031 / LCSD_SLAM

GNU General Public License v3.0
315 stars 86 forks source link

issue in matlab version for main.m #3

Closed amiltonwong closed 6 years ago

amiltonwong commented 6 years ago

Hi, @sunghoon031 ,

There exists some issues in matlab version for main.m. As my matlab version is 2015b, running main.m will prompt the following error:

[EuRoC MAV] Mode 1: Plotting Pre-Evaluated Results...
Error using errorbar (line 37)
There is no CapSize property on the ErrorBar class.

Error in PlotBarGraphs (line 93)
    errorbar(x, trackingTimeAvg_total(:,i), trackingTimeStd_total(:,i), 'k', 'linestyle', 'none', 'LineWidth', boxlinewidth, 'CapSize', 10);

Error in PlotResults_EuRoC_MAV (line 12)
PlotBarGraphs

Error in main (line 38)
        PlotResults_EuRoC_MAV;

It seems you had used a earlier version of matlab (before R2014b), and this line would prompt the error above. (reference)

A quick solution would be to modify as follows: errorbar(x, trackingTimeAvg_total(:,i), trackingTimeStd_total(:,i), but the font size would be too large to block the output figure.

Would you help to modify your code to adapt to newer version of matlab?

THX!

sunghoon031 commented 6 years ago

Thanks for your interest in the code!

I am using MATLAB R2016b, and it doesn't give me any error.

I suggest that you simply change the font size in PlotResults_EuRoC_MAV.m and PlotResults_TUM_monoVO.m (see the first few lines).