フィルターのクリア

i want to move the rows to next row after every 25 iterations.....but logic is not working

1 回表示 (過去 30 日間)
vinod kumar
vinod kumar 2013 年 12 月 28 日
回答済み: Image Analyst 2013 年 12 月 28 日
for time=delta_t:delta_t:20
if true
% code
end
for kk=1:11
for ii=1:101
for jj=1:101
h=kk-1;
ro=re-((re-ri)*(h/H));
QV((kk-1)*row+ii,jj)=((9*q*exp(3)*betatwo)/(pi*(exp(3)-1)*H*(re^2+ri^2+re*ri))*exp((-3*((x(jj)^2)+(y(ii)^2)+(z(kk)^2)))/(ro^2)));
end
end
end
if count < 25
QV=QV;
count=count+1;
else
QV=circshift(QV, [1,0]);
count=0;
end
end
  2 件のコメント
Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 28 日
Give a short example with 6x3 array and 3 iterations
Jan
Jan 2013 年 12 月 28 日
Posting code and the statement, that it logic does not work, does not allow to suggest an improvement. A clear definition of what you want cannot be guessed based on the posted details.

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

回答 (2 件)

Azzi Abdelmalek
Azzi Abdelmalek 2013 年 12 月 28 日
編集済み: Azzi Abdelmalek 2013 年 12 月 28 日
Maybe you want
if mod(count,25)
QV=QV;
else
QV=circshift(QV, [1,0]);
end
count=count+1;
  1 件のコメント
Jan
Jan 2013 年 12 月 28 日
編集済み: Jan 2013 年 12 月 28 日
QV = QV; ???
Resetting the counter to 0 should work sufficiently, so I do not understand this suggestion.

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


Image Analyst
Image Analyst 2013 年 12 月 28 日
Instead of this:
if count < 25
QV=QV;
count=count+1;
else
QV=circshift(QV, [1,0]);
count=0;
end
why not just append the QV onto the end of a "QVfinal" that you're building up?
QVfinal = [QVfinal;QV];

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by