Assign a vector to a cell element

Hello there!
I would like to assign a vector to a specific element of a cell array.
Say I have a vector v=(1 0 1)
My cell array is c, c={2,2, []} and I want it to be c={2,2,[1,0,1]}
Thanks in advance for your time!

 採用された回答

James Tursa
James Tursa 2016 年 6 月 23 日

0 投票

c{3} = v;

1 件のコメント

Kike
Kike 2016 年 6 月 23 日
thanks, that was easy, I was trying with num2cell and mat2cell! :S

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeCell Arrays についてさらに検索

製品

質問済み:

2016 年 6 月 23 日

コメント済み:

2016 年 6 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by