Hello,
I have data entries that look like this:
Column 1 | Column 2 Default | 8 Default 2 | 9 Default 3 | 3 Default 4 | 5 Card 1 | 6 Card 1 2 | 10 Card 1 3 | 3 Card 1 4 | 2 Card 1 5 | 9 Card 1 6 | 3 Card 2 | 2 Card 2 2 | 2 Card 2 3 | 6 Card 2 4 | 8 Card 2 5 | 6 Card 2 6 | 9
I want to be able to split all the column 1 entries into two columns, the base part and the number. The number I'm interested in is ONLY the last number after the last space. The base part is allowed to have a number in it.
The only common thing between all the entries is that they end with [space][number] and number can be between 1 and 10000.
For the entries similar to the (1,1) entry above, I need to get a 0 at the end of that string as well.
I think I can use 'strsplit' or 'regexp' to do this, but I'm not sure how to tell Matlab that I need it to split at the end of the string effectively (have it count in from the right).
Thanks for any assistance you are able to give,
Matt
Best Answer