Converting columns of strings into cells
이전 댓글 표시
Hello, I have a created an array of columns of strings and I want to convert this array into a cell array, where each cell contains indvidual strings. The name of array is proc_asm. In the screenshot you can see the individual strings, I want to put into cells as well as proc_asm' for better readability.
I generate the strings with a function and here is the code snippet where I do so:
S = [];
for str = node_list
%here I generate the strings for the array
s = generate_code1(graph(str{1}));
s = [s, ';'];
S = [S s]; %save the array
end
%modify array
[C, matches] = strsplit(str, ';');
proc_asm = fliplr(C);
codeidx = length(matches);
proc_asm'
end
I thought the easiest method would be to assign proc_asm' to a new cell array with the dimensions (length(matches), 1). But how can I define the individual cells?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!