필터 지우기
필터 지우기

how to seperate column contains many val

조회 수: 1 (최근 30일)
Amgad Abuwarda
Amgad Abuwarda 2018년 9월 13일
댓글: Amgad Abuwarda 2018년 9월 13일
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