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

1 次查看(过去 30 天)
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 CenterFile Exchange 中查找有关 Logical 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by