%%
%% D1  :  INFANT & TODLER first aid 
%% D2  :  BABIES & CHILDREN's room for your Home
%% D3  :  CHILD SAFETY at HOME 
%% D4  :  Your BABY's HEALTH and SAFETY 
%%     :  From INFANT to TODDLER 
%% D5  :  BABY PROOFING basics
%% D6  :  Your GUIDE to easy rust PROOFING
%% D7  :  Beanie BABIES collector's GUIDE 
%% D8  :  SAFETY GUIDE for CHILD PROOFING your HOME
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% TERMS: 1:BABY  2:CHILD 3:GUIDE 4:HEALTH 5:HOME
%%        6:INFANT 7:PROOFING  8:SAFETY 9:TODDLER
A = zeros(9, 7);
%%
A(1,2)=1; A(1,4)=1; A(1,5)=1; A(1,7)=1; % 1 baby..  
A(2,2)=1; A(2,3)=1; A(2,8)=1;           % 2 Child..
A(3,6)=1; A(3,7)=1; A(3,8)=1;           % 3 Guide  
A(4,4)=1;                               % 4 Health
A(5,2)=1; A(5,3)=1; A(5,8)=1;           % 5 Home
A(6,1)=1; A(6,4)=1;                     % 6 Infant
A(7,5)=1; A(7,6)=1; A(7,8)=1;           % 7 Proofing
A(8,3)=1; A(8,4)=1; A(8,8)=1;           % 8 Safety
A(9,1)=1; A(9,4)=1;                     % 9 Toddler
%%-------------------- 
A 
%% query = Child Safety 
%%  [1 2 3 4 5 6 7 8 9]  
q = [0 1 0 0 0 0 0 1 0]';
[A, q]  
%%
%% Normalize columns 
d = diag(1.0  ./ sqrt(diag(A'*A)));
A = A*d;
%%--------------------normalize q
q = q/norm(q);
%%-------------------- 2nd expl
%% query = baby-child-guide-safety 
%%   [1 2 3 4 5 6 7 8 9]  
q1 = [1 1 1 0 0 0 0 1 0]';
q1 = q1/norm(q1);
%% query = baby-child-proofing 
%%   [1 2 3 4 5 6 7 8 9]  
q2 = [1 0 0 0 0 0 1 0 0]';
q2 = q2/norm(q2);
