how to seperate column contains many val

1 次查看(过去 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
  3 个评论
Guillaume
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?
Amgad Abuwarda
Amgad Abuwarda 2018-9-13
it was stuct file then i converted it to table using struct2table. I have attached the stuct file, you can see the field X, it's the x=coordinate of some points, and you can see every row has different number of coordinates, Now i want for example to search for a specific x=coordinate in this field , but i think it's easier to separate it first then search

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Type Conversion 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by