How can I concatenate or merge cell in Array
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
shaimaa
el 23 de Ag. de 2022
Movida: Bruno Luong
el 24 de Ag. de 2022
dear everyone
can you help me if I have array like (3*3) and I want convert it to ,(1*3) but the array each cell content three numbers for examble if array 3*3is
2 3 5
6 7 6
5 7 1
And 1*3 is
[ 2 6 5 3 7 7 5 6 1]
Best regards
3 comentarios
Rik
el 23 de Ag. de 2022
As you can see, the spaces don't really do anything, I just copied what you wrote to show you the result. Voss showed you how you can split your matrix to a cell vector. If that is not what you want, you need to explain what you do want. Make sure your syntax is valid Matlab syntax, instead of what you wrote in your comment.
Respuesta aceptada
Voss
el 23 de Ag. de 2022
A = [2 3 5; ...
6 7 6; ...
5 7 1];
C = num2cell(A,1)
celldisp(C)
5 comentarios
Rik
el 23 de Ag. de 2022
I don't understand what your problem is. The function works the exact same way on a larger array. Just pass your large array as the input argument. Is there still a problem?
Más respuestas (0)
Ver también
Categorías
Más información sobre Data Type Conversion en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!