help with appending strings [message #89294] |
Thu, 14 August 2014 11:42  |
g.nacarts
Messages: 148 Registered: November 2013
|
Senior Member |
|
|
Hi all
So far I was working with 1 pair of stings (total=2 strings) but now I need to work with 180 pairs (total=360 strings). I define my two strings as shown below:
1 = 'C:\Users\string1'
2 = 'C:\Users\string2'
procedure....
Because now I need to define 360 strings I was wondering if I can write a loop instead of defined this like this.
With thanks
Gina
|
|
|
|
|
|
|
Re: help with appending strings [message #89300 is a reply to message #89298] |
Thu, 14 August 2014 17:16  |
Phillip Bitzer
Messages: 223 Registered: June 2006
|
Senior Member |
|
|
On Thursday, August 14, 2014 2:51:43 PM UTC-5, g.na...@gmail.com wrote:
> Because I need to visualize the string since it's an image
This doesn't make any sense. String is a particular variable type. Image (typically some sort of 2d numeric array) is a different variable type. (OK, OK, so it could be 3d....)
Further, trying to cast a string to double, in general, doesn't work. (Unless the string is a number of course.)
TVSCL takes a 2d array. So, a string wouldn't work - wrong variable type. You can't "visualize" a string in this way. Perhaps what you mean is the data in the files (the strings) have 2d data?
If so, you need to actually read in the data. I'm guessing you want something along the lines of READ_CSV, READCOL, etc. You'll manipulate the output to make a 2d array.
Craig's post gives a clue how to do this. ("operate on DIR"). This is where you would read in the data, for each string (file).
|
|
|