You saved me a ton of time today.
One nice addition would be a possibility to put a second row with units below row one that show the fields. I notice that many of my engineering data files have two header lines; one width the field names and the second line with the units.

I got it fixed, code works great!!
When I set the background transparent the part inside the graph remains white, while the sections outside the axis become transparent, any tips?

Does anyone's images get the edges chopped off when using the 'undistortimage' tool? If so how can I fix this to where my whole image is shown and not a cropped version. Thank you!

Thanks Jaap. Yes, my images have pincushion distrotion and should be corrected. I saw that lensdistort(I,k) works well for small pincushion distortions specially for the central part of the image. The edges get the opposite effect of Barrel. I can send you a sample image I started working on as an example. How I can I use the other algorithms?

I have to use this optimization algorithm to minimizing a objective function like this:
error = ((((a./(a+b))-mean).^2)./(mean.^2))+(((((a.*b)./((a+b+1).*((a+b).^2)))-variance).^2)./(variance.^2))+(((((2.*(b-a).*(sqrt(a+b+1)))./((a+b+2).*(sqrt(a.*b))))-skewness).^2)./(skewness.^2))
This is a function beta with parameters a and b. I want to calculate a and b minimizing this fuction error.
I dont know how I can impose the limits of a and b in the algorithm. The limits are, a>0,b>0 and b>0.
Thanks all

Does anyone's images get the edges chopped off when using the 'undistortimage' tool? If so how can I fix this to where my whole image is shown and not a cropped version. Thank you!

Comment only