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

1 回表示 (過去 30 日間)
Annie Lodhi
Annie Lodhi 2019 年 7 月 21 日
コメント済み: dpb 2019 年 7 月 21 日
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);
}

回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by