フィルターのクリア

addressing elements in a cell aray of cells

2 ビュー (過去 30 日間)
Jeff Eriksen
Jeff Eriksen 2014 年 7 月 15 日
コメント済み: Jeff Eriksen 2014 年 7 月 15 日
I cannot figure out how to address and replace individual elements of the inner cell array in the following toy example:
sub(1,:) = {'Jeff',{'eeg1','eeg2'}}; % sets up a cell array with string and an embedded CA
new(1,:) = sub(1,:) % make a copy
new{1,2}(2) = cell('eeg3') % attempt to change one value
Error using cell Conversion to cell from char is not possible.
Error in test_cell (line 27) new{1,2}(2) = cell('eeg3')
I also tried with out the cell() and it still complains. Thanks, -Jeff

採用された回答

James Tursa
James Tursa 2014 年 7 月 15 日
編集済み: James Tursa 2014 年 7 月 15 日
Not sure what your actual desired outcome is, but this syntax works to replace the 'eeg2' with 'eeg3':
new{1,2}(2) = {'eeg3'}
If that is not the outcome you want, please post exactly what you want the result to be and we can help with the syntax.
  1 件のコメント
Jeff Eriksen
Jeff Eriksen 2014 年 7 月 15 日
just what I neended, thanks

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeEEG/MEG/ECoG についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by