필터 지우기
필터 지우기

Split cells into rows and combine all into a table

조회 수: 2 (최근 30일)
Yu Li
Yu Li 2020년 5월 5일
댓글: Yu Li 2020년 5월 6일
Hi,
I have a list (cell) which contains peak information of a spectrum. Normally each peak corresponds to a single row. However, some might have 2 or more rows stored in a subcell. How can I split these subcells into different rows and convert them all into a table, so that I can use uitable to display the results?
Please find attached my data.
Many thanks!
  댓글 수: 2
Walter Roberson
Walter Roberson 2020년 5월 6일
? All of the values in that cell array are scalars ?
For any given row of the cell array, is it the case that all of the entries in that cell row will have the same number of stored rows? Or is it possible you might have something like {[1;2], [3]} with it being required to make copies of the 3 in order to match the number of rows in the [1;2] ?
Yu Li
Yu Li 2020년 5월 6일
Hi Walter,
I'm afraid the latter is true. Please check the attached file as the structure is quite clear. You are right that making copies is needed for certain rows to match the other rows where there are subcells. Or maybe we can leave it blank?
Many thanks

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Mathematics에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by