how to write a code for cosine similarity mentioned in images?
13 views (last 30 days)
I want to write the code for function that I mentioned in the images, where M = 96. The output power for the ith day is pi =[p , . . . , piM ]T , ∀i ∈ [1, . . . , 366]. j ∈ [1, . . .,366] and pjm is the mth output power point in the jth day, pj = [p , . . . , pjM ]T. k is an interval value between the ith day and the jth day, i + k = j. I wrote following code but it does not work correctly.
can anyone help me on this?
thanks for your consideration.
CS=zeros(96,96); % Initialise output