How to separate characters in a cell array by commas
Ältere Kommentare anzeigen
Hello I have the following code:
e = [3 0 -6];
n = length(e);
e_str = cell(1,n);
for i = 1:n
e_str(1,i) = {num2str(e(i))};
end
disp(e_str)
I'd like to separete the output with commas as follows:
{'3'} {','} {'0'} {','} {'-6'}
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Lengths and Angles finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!