Hi
can anyone help me to save the data from the matlab to .txt file with has comma after each number. for example
A=[1 2 3 4 5 6 7 8 9];
is there any way to have A in .text and be like 1,2,3,4,5,6,7,8,9
thank you very much for helping

 Akzeptierte Antwort

Fangjun Jiang
Fangjun Jiang am 22 Jan. 2018

0 Stimmen

csvwrite()

3 Kommentare

mohammed hussein
mohammed hussein am 22 Jan. 2018
thank you very much for your answer . i want the data be saved in .text form with comma . this command just put the comma between the numbers
Fangjun Jiang
Fangjun Jiang am 22 Jan. 2018
try csvwrite('test.txt',[1 2 3 4 5 6 7 8 9]);
mohammed hussein
mohammed hussein am 22 Jan. 2018
this is exactly what i want
thank You

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Data Import and Export finden Sie in Hilfe-Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by