# شرح كود

**URL:** <https://almohandes.org/t/%D8%B4%D8%B1%D8%AD-%D9%83%D9%88%D8%AF/14953>\
**Category:** برنامج الماتلاب\
**Created:** [1 يونيو 2008، 11:09ص UTC](https://almohandes.org/t/%D8%B4%D8%B1%D8%AD-%D9%83%D9%88%D8%AF/14953 "2008-06-01T11:09:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://almohandes.org/uploads/default/original/3X/0/9/09f0459fb00cd1da72e640e541b6bc7ea9548fe8.png) [@system](https://almohandes.org/u/system)\
**Post date:** [1 يونيو 2008، 11:09ص UTC](https://almohandes.org/t/%D8%B4%D8%B1%D8%AD-%D9%83%D9%88%D8%AF/14953/1 "2008-06-01T11:09:01Z")

</div>

السلام عليكـم ..  
مسـاء الخير  
لو سمحتو أنـا اريد شـرح الكود هذا  
وشكراً لكــم اذا تكرمتــو

```auto
 
 
 

for jj=1:lengthofseq:50*lengthofseq
the_test_seq=the_all_new_seq(:,jj:jj+(lengthofseq-1))
the_corrected_seq(1,:)=the_test_seq(1,:);
gf=2;
while gf<=numseq
the_line_seq=the_test_seq(gf,:)
[COLOR=red]the_ref_seq=The_original(gf,:);[/color]
[COLOR=red]gapsloc=findstr(the_line_seq,'_');[/color]
[COLOR=red]the_line_seq(gapsloc)=[];[/color]
x=strcmp(the_ref_seq,the_line_seq);
if x==1
disp(' it is okey')
the_line_seq=the_test_seq(gf,:);
else
disp('it must be corrected')
the_line_seq=the_test_seq(gf,:);
[the_line_seq]=correct(the_line_seq,the_ref_seq,numofgap)
end
the_corrected_seq(gf,:)= the_line_seq;

gf=gf+1;
end
the_corrected_seq
score_of_the_corected_seq=calculatescore(the_corrected_seq,1,-1,-2)
the_all_new_corected_seq(:,jj:jj+(lengthofseq-1))=the_corrected_seq;
end
the_all_new_corected_seq

```

وخاصه الكود المكتوب بالون الاحمر , وشكراً

---

<div class="post-metadata">

**Author:** ![ahmedeldeep](https://almohandes.org/user_avatar/almohandes.org/ahmedeldeep/32/6086_2.png) [@ahmedeldeep](https://almohandes.org/u/ahmedeldeep)\
**Post date:** [1 يونيو 2008، 1:54م UTC](https://almohandes.org/t/%D8%B4%D8%B1%D8%AD-%D9%83%D9%88%D8%AF/14953/2 "2008-06-01T13:54:48Z")

</div>

اعتقد ان الكود ناقص لان فى متغيرات غير معرفة  
lengthofseq  
و  
numseq

فى الجزء الاول

```auto
for jj=1:lengthofseq:50*lengthofseq

```

بيولد القيم  
وبعدين يوجد هذا المتغير the\_test\_seq عبارة عن عمود بيضع قيمه فى العمود التى قيمته من jj الى jj+(lengthofseq-1)

---

<div class="post-metadata">

**Author:** ![soud20002001](https://almohandes.org/letter_avatar_proxy/v4/letter/s/dfb087/32.png) [@soud20002001](https://almohandes.org/u/soud20002001)\
**Post date:** [2 يونيو 2008، 12:15ص UTC](https://almohandes.org/t/%D8%B4%D8%B1%D8%AD-%D9%83%D9%88%D8%AF/14953/3 "2008-06-02T00:15:22Z")

</div>

ساشرح الكودب باللون الاحمر فقط  
اولا هو في فور لووب ياخذ كل مرة صف من المصفوفة (الاوريجنال) ويسميه (الريفرينس) ابتداءا من الصف الثاني  
ثانيا هو يبحث عن مكان وجود القاب في السلسلة (ذا لاين)  
ثالثا هو يشطب امكان وجود القاب  
وبعد ذلك يقارنها مع مصفوفة الريفرينس

---

<div class="post-metadata">

**Author:** ![system](https://almohandes.org/uploads/default/original/3X/0/9/09f0459fb00cd1da72e640e541b6bc7ea9548fe8.png) [@system](https://almohandes.org/u/system)\
**Post date:** [2 يونيو 2008، 4:51ص UTC](https://almohandes.org/t/%D8%B4%D8%B1%D8%AD-%D9%83%D9%88%D8%AF/14953/4 "2008-06-02T04:51:46Z")

</div>

شكراً لكــم جميعاً  
ربنا يعطيكم العافيه ,
