
Basic Q- How can I stitch together multiple images and how do I append a variable to a string?

jrysocas
Function CreateSections() variable i=0 variable j=10 do duplicate/o/r=((j-10),j)(0,10) fly section_i newimage section_i AutoPositionWindow/E $WinName(0,1) j=j+10 i=i+1 while(i<=10) End
Ideally, completion of this program will yield 11 images named section_0, section_1, section_2, ..., and section_10. Instead, only one image called section_i is created. What is the appropriate syntax for appending a variable to a string? Also, what function could I use to stitch these images back together after the program runs to completion?
Thanks in advance,
-jry
Your code segment for creating the sub-images should be changed. If I understand correctly that you want 10x10 images out of 100x100 image you would want to use for row rr and column cc:
I hope this helps,
A.G.
WaveMetrics, Inc.
July 12, 2013 at 05:08 pm - Permalink
Use + to append strings. Use num2istr or num2str to convert a number to a string. You could also use sprintf.
Here is a solution for your task. I separated the step of creating the sub-images from the step of creating the plots. This splits the function into two clear parts which makes each of them easier to code, read and use.
July 12, 2013 at 05:24 pm - Permalink