フィルターのクリア

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