How to display data after one iteration step

1 回表示 (過去 30 日間)
Veronika
Veronika 2014 年 12 月 2 日
回答済み: Thorsten 2014 年 12 月 2 日
Dear all,
I have code, which displays all iteration steps (data) into one figure, but I would like to display (save) for loop data after one iteration step (iteration step1 = figure(1), one iteration step2 = figure(2),...). It means after each change of variable j display one figure.
My code:
imdl = mk_common_model('d2d1c',16);
img_1 = mk_image(imdl);
figure
show_fem(img_1);
img_2 = img_1;
v = 0:0.1:1
idx = 1;
for j = 0:0.25:1
v(idx) = j;
['x-' num2str(j) '.^2+ (y- 0.5) .^2<0.1^2, ''x,' 'y,' 'z'];
select_fcn = inline('(x-j).^2+(y-0.5).^2<0.1^2','x','y','z');
img_2.elem_data = 1 + elem_select(img_2.fwd_model, select_fcn);
idx = idx + 1;
end
figure
show_fem(img_2);
vh = fwd_solve(img_1);
vi = fwd_solve(img_2);
img_3 = inv_solve (imdl,vh,vi);
figure
show_fem(img_3);
I think could be implement using cell , but I don´t have any idea how to do it.
Thank you, for any idea.

採用された回答

Thorsten
Thorsten 2014 年 12 月 2 日
Put a figure command and the command to show your image into your for loop.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by