Sir whats the functioning of this code:

8 ビュー (過去 30 日間)
Vandana
Vandana 2013 年 9 月 19 日
count=0;
j=1;
for i=1:ro
if(rV(i)>0)
rda(j)=i;
rca(j)=1;
count=0;
j=j+1;
elseif(count==0)
rda(j)=i;
rca(j)=0;
j=j+1;
count=1;
else
count=1;
end;
end;
flag=1;
k=1;
for i=1:j-2
if((rda(i+1)-rda(i))>=12)
if(flag==1)
ra(k)=rda(i);
k=k+1;
flag=0;
end;
else
flag=1;
ra(k)=rda(i);
end
end
where ro means number of rows and rv means row variance and rda and rca are normal variable.
[EDITED, Jan, code indented for demonstration]
  4 件のコメント
Vandana
Vandana 2013 年 9 月 19 日
this is the formatted code sir I don't know sir why preview is looking like this.sir I want explaination of each line what it is doing.sir before this code I calculated the rowwise variance and column wise variance.
thank you
Jan
Jan 2013 年 9 月 20 日
編集済み: Jan 2013 年 9 月 20 日
@Vandana: Did you try Ctrl-A Ctrl_I for an auto-indentation in Matlab's editor?

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2013 年 9 月 19 日
It looks like the code functions to produce arrays called ra, rca, and rda. It looks like perhaps some kind of counting or thresholding operation but with no comments it's hard to figure out their intent. Why don't you ask the author, and ask them why they write code with no comments in it? Or ask them what their intent is?
  4 件のコメント
Walter Roberson
Walter Roberson 2013 年 9 月 20 日
It appears to be Hindi, and it appears that Google Translate does a terrible job with romanized Hindi. My investigation is suggestive that "kuch" translates as "something" or perhaps "anything". I don't know... "please edit the code" ??
Videet
Videet 2013 年 9 月 20 日
"sir mai kuch edit karti hu" is in Hindi, that means "sir I will edit something"
Dear Vandana, I think your code is associated with some previous values. It looks like it is only a small part of some code. Try to identify variable: ro, rV, rda, & rca.

サインインしてコメントする。

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by