フィルターのクリア

using cell to add row

5 ビュー (過去 30 日間)
aldo
aldo 2023 年 11 月 10 日
回答済み: Mann Baidi 2023 年 11 月 10 日
xxx={'Lavorato assieme n. giorni',' ',1;'Giorno Positivi e negativi ',' ',2}
xxx = 2×3 cell array
{'Lavorato assieme n. giorni' } {' '} {[1]} {'Giorno Positivi e negativi '} {' '} {[2]}
if i want to add ("Lavorato xxx',' ',3) in this 3x3 cell how can i write code?

採用された回答

Stephen23
Stephen23 2023 年 11 月 10 日
xxx = {'Lavorato assieme n. giorni',' ',1;'Giorno Positivi e negativi ',' ',2}
xxx = 2×3 cell array
{'Lavorato assieme n. giorni' } {' '} {[1]} {'Giorno Positivi e negativi '} {' '} {[2]}
xxx(3,:) = {'Lavorato xxx',' ',3}
xxx = 3×3 cell array
{'Lavorato assieme n. giorni' } {' '} {[1]} {'Giorno Positivi e negativi '} {' '} {[2]} {'Lavorato xxx' } {' '} {[3]}

その他の回答 (1 件)

Mann Baidi
Mann Baidi 2023 年 11 月 10 日
Hi,
I understand you would like to add rows to your cell at the end.
You can do this using the following code:
xxx={'Lavorato assieme n. giorni',' ',1;'Giorno Positivi e negativi ',' ',2}
xxx = 2×3 cell array
{'Lavorato assieme n. giorni' } {' '} {[1]} {'Giorno Positivi e negativi '} {' '} {[2]}
xxx=[xxx;{'Lavorato xxx',' ',3}]
xxx = 3×3 cell array
{'Lavorato assieme n. giorni' } {' '} {[1]} {'Giorno Positivi e negativi '} {' '} {[2]} {'Lavorato xxx' } {' '} {[3]}
Hope this helps!

カテゴリ

Help Center および File ExchangeLanguage Fundamentals についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by