How to calculate cosine similarity score between two pieces of C code?
1 view (last 30 days)
Show older comments
I am bignner in matlab.I have to calculate the cosine similarity score between two pieces of C code . Is it possible whih matlab? If yes then how?
Please
The example of piece of code is given as follow.
void sumProd1A(int n) {
double sum = 0.0; //C1
double prod = 1.0;
int i;
for (i = 1; i <= n; i++)
{ sum = sum + i;
prod = prod * i;
foo2(sum, prod);}
}
void main()
{
printf("\nsumProd1A_Cordy: %lf ");
sumProd1A(4);
}
Answers (0)
See Also
Categories
Find more on Logical in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!