How do I repair the eror?

2 visualizaciones (últimos 30 días)
Ali Nik
Ali Nik el 22 de Abr. de 2023
Comentada: Ali Nik el 22 de Abr. de 2023
#How do I repair the error?
z=Y(1,j)
zz=cellstr(z)

Respuestas (1)

Rik
Rik el 22 de Abr. de 2023
You need to make sure each element of the cell array is a char vector. Since currently the second one is a cell, you need to unpack it. The code below should result in a cellstr.
z=Y(1,j)
zz=[z(1) z{2}];
  1 comentario
Ali Nik
Ali Nik el 22 de Abr. de 2023
This is an example of my data, the data changes in each stage and it is possible that each stage has different data and it is not always the second data of the cell, and sometimes it is the first cell and sometimes it is both cells.

Iniciar sesión para comentar.

Categorías

Más información sobre Characters and Strings en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by