multiply each column of a cell matrix that contains NaN by 8

1 回表示 (過去 30 日間)
Sabbas
Sabbas 2012 年 7 月 27 日
Dear all,
I have
A={
'NaN' 'NaN'
'2' '2'
'8' 'NaN'
'10' '10'
'56' '56'
'NaN' '56'
'36' '36'
'36' '36'
'NaN' 'NaN'
'56' '56'
'35' '35'
'23' 'NaN' }
and I want to multiplpy each column by say 8
thank you

採用された回答

Andrei Bobrov
Andrei Bobrov 2012 年 7 月 27 日
cellfun(@num2str,num2cell(str2double(A)*8),'un',0)

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by