comma insertion in array

1 view (last 30 days)
병극 조
병극 조 on 23 Jun 2022
Commented: KSSV on 23 Jun 2022
I would like to add commas between array values.
for example, I have a array A.
A = [1 2 3];
I would like to get a list of B from A.
B = [1, 2, 3];
How can I do this?
  4 Comments
병극 조
병극 조 on 23 Jun 2022
no type change. I just want to put commas.
Thank you.

Sign in to comment.

Answers (1)

KSSV
KSSV on 23 Jun 2022
A = [1 2 3] ;
dlmwrite('test.txt',A)
  2 Comments
KSSV
KSSV on 23 Jun 2022
Thanks is accepting/ voting the answer. :)

Sign in to comment.

Tags

Products


Release

R2021b

Community Treasure Hunt

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

Start Hunting!