It’s so long and complex code with many sub functions.. What do you want to test? You have a table or stucture file , with a column named X, but as you see it has many variables separated by space, i want to split them in many columns and save the output in a new table
how to seperate column contains many val
4 views (last 30 days)
Show older comments
Hez guys As you can see in the screenshot, it's a column in a table called TABLE1 I want to seperate these values into many columns ( I don't know the number of columns because as you see it's not the same for all rows how to do this? thanks
3 Comments
Guillaume
on 13 Sep 2018
it has many variables separated by space
You're confusing the display, where matlab does use a space to separate elements of a vector, and the storage. Internally, everything is stored as numbers one after the other (for a given row) of X.
It is not possible to create a table where the rows have different number of variables, so if you were to split each vector into individual columns you'd have to pad the shorter one with something (possibly NaN). I wouldn't recommend that as it would more likely make further processing harder not easier.
Can you explain what you want to do with the data, and why you want it split?
Answers (0)
See Also
Categories
Find more on Data Type Conversion in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!