现有一个3*3元胞,A= {{1},{2},{3};{4},{5},{6};{7},{8},{9}}; 如何让其变成 B = {{1;2;3};{4;5;6};{7;8;9}}?

 Respuesta aceptada

0 votos

B=mat2cell(cellfun(@(x) cell2mat(x),A'),3,[1 1 1])

Más respuestas (0)

Categorías

Más información sobre MATLAB 快速入门 en Centro de ayuda y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!