Borrar filtros
Borrar filtros

Info

La pregunta está cerrada. Vuélvala a abrir para editarla o responderla.

eliminate duplicate in a cell

2 visualizaciones (últimos 30 días)
ben zekri raouf
ben zekri raouf el 19 de Feb. de 2015
Cerrada: MATLAB Answer Bot el 20 de Ag. de 2021
Hi ,im asking if there is a way to eliminate the dublicate,so the result must be('eight two lions') .Any help is greatly appreciated.
>> a
a =
'الأسود إثنان' ('two lions')
>> b
b =
'الأسود ثمانية' ('eight lions')
>> class(a)
ans =
cell
>> class(b)
ans =
cell
>> strcat(b,{' '},a)
ans =
'الأسود ثمانية الأسود إثنان' ('eight lions two lions)
  2 comentarios
Elias Gule
Elias Gule el 19 de Feb. de 2015
c = [a ' ' b]; c = unique(regexp([c{:}],'\s+','split'));
tmp = c(2); c(2) = c(3); c(3) = tmp;
ben zekri raouf
ben zekri raouf el 19 de Feb. de 2015
it works really good,thank you so much :)

Respuestas (0)

La pregunta está cerrada.

Community Treasure Hunt

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

Start Hunting!

Translated by