How to display data after one iteration step
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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.
0 commentaires
Réponse acceptée
Thorsten
le 2 Déc 2014
Put a figure command and the command to show your image into your for loop.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Loops and Conditional Statements dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!