How to calculate cosine similarity score between two pieces of C code?

2 visualizaciones (últimos 30 días)
Annie Lodhi
Annie Lodhi el 21 de Jul. de 2019
Comentada: dpb el 21 de Jul. de 2019
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);
}

Respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by