PartC - [W I] = (sort(-theta1)); h = [I]; end e for j = 1:8...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
%Iniese Umah %search engine operation close all; close all; clc; A = rand(50,900); %represent 50 words and 900 articles A = vertcat(A,A,A,A); x = A(:,1); syms Z Y integer Y = 0; % Z counting variable % Y column count % K determines the number of range of cosines of the angles to display for i = 1:900; Z(i) = Y + i; theta1(i) = ((dot(A(:,i),x))/(sqrt(sum(A(:,i).^2))*sqrt(sum(x.^2))));
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: [W I] = (sort(-theta1)); h = [I]; end e for j = 1:8 sprintf('the cosine angle is %d\n from column %d\n\n\n',abs(W(j)),h(j)) %it was alot easy to use to sprintf syntax because it is similat to C-programing % i am conversant with C-language end e...
View Full Document

Ask a homework question - tutors are online