Mercurial > repos > public > sbplib
view plotConvergenceFit.m @ 175:8f22829b69d0 feature/beams
Added and upgraded schemes for the beam equation in 1d and 2d.
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Fri, 26 Feb 2016 16:21:47 +0100 |
parents | 4fcc4448682f |
children | 0ef8965dd745 |
line wrap: on
line source
% Draws a line in a loglog plot with slope `slope` and position `pos` % and `width` orders of magnitude wide. % ex: pos = [1e-1 1e-4] function hand = plotConvergenceFit(slope, pos, width) x0 = pos(1); y0 = pos(2); x = [x0*10^-(width/2) x0*10^(width/2)]; y = x.^slope * x0^-slope * y0; hand = line(x,y); hand.Color = Color.black; hand.LineStyle = '--'; hand.LineWidth = 2; end