필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

add colums in a cell array of strings

조회 수: 2 (최근 30일)
pamela sulis
pamela sulis 2016년 3월 22일
마감: MATLAB Answer Bot 2021년 8월 20일
Hi, I have the cell array Location(1,4).locID, attached, and I want to trasform it: I want that every row have 19 colums (19 is the max value of the length of all rows). Ex Row corrisponding to Location(1,4).locID{15,1} is
'674' '719' '618' '631' '618' '631' '618' '631' '618' '674'
and I want that became
'674' '719' '618' '631' '618' '631' '618' '631' '618' '674' '' '' '' '' '' '' '' '' ''
and I want to apply this for all rows
Can you help me?
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2016년 3월 22일
No file attached
pamela sulis
pamela sulis 2016년 3월 22일
sorry, now I have attached the file

답변 (1개)

Azzi Abdelmalek
Azzi Abdelmalek 2016년 3월 22일
편집: Azzi Abdelmalek 2016년 3월 22일
s={'674' '719' '618' '631' '618' '631' '618' '631' '618' '674'}
out=repmat({''},1,19)
out(1:numel(s))=s
  댓글 수: 3
Azzi Abdelmalek
Azzi Abdelmalek 2016년 3월 22일
편집: Azzi Abdelmalek 2016년 3월 22일
what is Location(1,4).locID? a cell array? the size?
pamela sulis
pamela sulis 2016년 3월 22일
cell array, 137x1 I have add the matlab file with Location(1,4).locID

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by