Filter löschen
Filter löschen

Info

Diese Frage ist geschlossen. Öffnen Sie sie erneut, um sie zu bearbeiten oder zu beantworten.

calculating and writing sorted results in matlab

2 Ansichten (letzte 30 Tage)
metin yilmaz
metin yilmaz am 6 Apr. 2020
Geschlossen: MATLAB Answer Bot am 20 Aug. 2021
Would you please explain how to write sorted results to a txt file?
For example if you have (0, 2, 4, 6, 8) and (1, 3, 5, 7, 9) and you want to write their sorted combinations in a txt file. You want the file in this way:
0 2 4 6
0 2 4 8
0 2 6 8
0 4 6 8
1 3 5 7
1 3 5 9
1 3 7 9
1 5 7 9
2 4 6 8
3 5 7 9
Can I use the command dlmwrite with some parameters?
Thank you.

Antworten (1)

darova
darova am 6 Apr. 2020
  • Can I use the command dlmwrite with some parameters?
Yes you can. example
M = [1 2 3; 4 3 2];
dlmwrite('myFile.txt',M,'delimiter','\t','precision',3)

Diese Frage ist geschlossen.

Community Treasure Hunt

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

Start Hunting!

Translated by