%}
importTool('ndlutil');
textWidth = 13;
randn('seed', 1e6);
rand('seed', 1e6);
markerSize = 8;
markerLineWidth = 6;
blueColor = [0, 0, 1];
redColor = [1, 0, 0];
magentaColor = [1, 0, 1];
blackColor = [0, 0, 0];
if blackBackground
blueColor = 1-blueColor;
redColor = 1-redColor;
magentaColor = 1-magentaColor;
blackColor = 1- blackColor;
end
%{
frame start
[plain,fragile]
columns start
[c] {column width=0.5\textwidth}
overprint start
{onslide slideno=<1>} What about two unknowns and one
observation?
Assume
overprint end
{column width=0.5\textwidth}
%}
x = [1];
y = [3];
figure(1), clf
a = plot(x, y, 'x');
set(a, 'markersize', markerSize, 'linewidth', markerLineWidth, 'color', redColor)
set(gca, 'xtick', [0 1 2 3])
set(gca, 'ytick', [0 1 2 3 4 5])
ylim = [0 5];
xlim = [0 3];
set(gca, 'ylim', ylim)
set(gca, 'xlim', xlim)
set(gca, 'box', 'off')
line([xlim(1) xlim(1)], ylim, 'color', blackColor)
line(xlim, [ylim(1) ylim(1)], 'color', blackColor)
xlabel('$\inputScalar$')
ylabel('$\dataScalar$')
printLatexPlot('onePoint', '../../../ml/tex/diagrams', 0.45*textWidth)
xvals = linspace(0, 3, 2);
for i = 1:100
c = randn(1)*2;
m = (y - c)/x;
yvals = m*xvals+c;
hold on
a = plot(xvals, yvals, '-');
set(a, 'linewidth', 2, 'color', blueColor)
if i < 9 || i == 100
if i < 9
printLatexText(['c=' numsf2str(c, 3) '\Longrightarrow m=' numsf2str(m, 3)], ['onePointCval' num2str(i) '.tex'], '../../../ml/tex/diagrams')
end
printLatexPlot(['onePoint' num2str(i)], '../../../ml/tex/diagrams', 0.45*textWidth)
end
end
%{
overprint start
{onslide slideno=<1-2>}
{onslide slideno=<3>}
{onslide slideno=<4>}
{onslide slideno=<5>}
{onslide slideno=<6>}
{onslide slideno=<7>}
{onslide slideno=<8>}
{onslide slideno=<9>}
{onslide slideno=<10>}
{onslide slideno=<11>}
overprint end
columns end
frame end