Toolbox plot a covariance matrix 2D and 3D

The code for version 1.0.0 is here [rar].

Plot 2D covariance matrix

  • The main file is plotEllipse2d.m which shows you how to use the function fn_plot_covariance_2D.
  • fn_plot_covariance_2D: return the x-y coordinates for the covariance matrix
    • [x y] = fn_plot_covariance_2D(mu,Sigma,steps,M)
  • fn_calculateEllipse: the core engine to calculate x-y location of points on the ellipse perimeter
    • [X Y] = fn_calculateEllipse(x, y, a, b, angle, steps)

Plot 3D covariance matrix

  • plotEllipse3d: The main code plotting (3D) ellipsoid. I did not have time to make function out of it.