Hi @IHM,
It’s a bit hard to read what’s going on in your code because it is not rendered correctly.
Could you perhaps edit your post and reformat your code following the suggestion in this Markdown User Reference Guide, in particular the Code formatting section?
Thanks a lot!
PS: I move your post to the UQLab Community Q&A and How To section of UQWorld, because I think it’s more appropriate there