Code covered by the BSD License  

Highlights from
Optimizing breakpoints for Tables

image thumbnail

Optimizing breakpoints for Tables


Richard Willey (view profile)


MATLAB code to support the "Generating Optimal Tables using MATLAB" webinar.

% Copyright 2009 The MathWorks, Inc.

function [x,y] = delta2xy(delta,M,Xrange,Yrange)
% Convert a vector of delta x/y into x/y coordinates
N = length(delta) - M;
x = tril(ones(M+1),0) * [Xrange(1) delta(1:M)]';
x(end+1) = Xrange(2);
y = tril(ones(N+1),0) * [Yrange(1) delta(M+1:end)]';
y(end+1) = Yrange(2);
% add interior points
[x,y] = meshgrid(x,y);

Contact us