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
2 ビュー (過去 30 日間)
古いコメントを表示
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/195740/image.png)
3 件のコメント
Guillaume
2018 年 9 月 13 日
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?
回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Data Type Conversion についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!