How to display data after one iteration step

2 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Loops and Conditional Statements 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by