Question: i have this (a rough e.g):

```
<StackPanel>
    <StackPanel Orientation="Horizontal">
        <Label .../>
        <TextBox .../>
        <Button Content="Add new input row" ... />
    </StackPanel>
</StackPanel>

```

pretty self explanatory, i want to add a new Horizontal StackPanel with every click on the button..

is that possible?

thank you!

Answer: 
You could use `strsplit` to split your string and then access the array element that you are interested in.

```
mystring = '245    0.00000000 2456171.50000000  1030492816.000    5.14501001           1     IG      5     -1.188022   ....   5.032154 90';
split = strsplit(mystring);

```

If your version of MATLAB is too old and `strsplit` isn't included, then it can be downloaded from [MATLAB central](http://www.mathworks.co.uk/matlabcentral/fileexchange/21710-string-toolkits/content/strings/strsplit.m).

Then you could use `str2num` or `str2double` to turn each string you are interested in into a number.

```
col5 = str2double(split(5));
% or
mycols = str2double(split([5 37 117]));

```

[strsplit reference](http://www.mathworks.co.uk/help/matlab/ref/strsplit.html)  

[str2num reference](http://www.mathworks.co.uk/help/matlab/ref/str2num.html)  

[str2double reference](http://www.mathworks.co.uk/help/matlab/ref/str2double.html)
Here is a piece of code that replicates `%*f` using `repmat` (with cells). It then changes the `%*f` into `%f` at the provided indexes, and finally transform the cells into a `char` vector.

```
f_star_nb = 20;
f_ind = [2 6 9];

f = repmat({'%*f'}, f_star_nb, 1)
f(f_ind) = {'%f'};
f = [f{:}]

```