%Pattern design
%6/24/2021

%Intuitively, the length of the pattern L, depends on the height of the
%pouch, x, and the depth of the pouch, z, but not the width of the pouch,y.
%The width of the pattern W, depends on the width and depth of the pouch, y
%and z respectively, but not the height of the pouch, x.

%Assume that the relationship is linear

%The following code is used to find the coefficients to obtain the equation
%between dimensions of pouch and pattern

%Measurements based from 
%https://noodle-head.com/2012/06/open-wide-zippered-pouch-tutorial-size.html

%All the lengths of pattern
L = [7;9;11];

%matrix of variables inputted (height and depth
mat1 = [4.5 3.5;
        6    4;
        8.5 4.5];


%find coefficients for equation of length
coeffL = linsolve(mat1,L)


%All the widths of pattern
W = [10;12;14];

%matrix of variables inputted (width and depth of pouch)
mat2 = [5    3.5;
        6.5  4;
        8    4.5];

%find coefficients for equation of width
coeffW = linsolve(mat2,W)




