Is there a way to remove the Column titles when using format longg?

10 visualizzazioni (ultimi 30 giorni)
I am currently working on a project for school. I need to display a matrix using disp() or fprintf(). Everytime I display using disp() the code comes up like this
1.0e+07 *
0.0000 0.0000 0.0000 0.0000 2.9000 0.0000 0.0002 0.0045
0.0000 0.0000 0 0.0000 2.9000 0.0005 0.0000 0.0045
0.0000 0.0000 0.0000 0.0000 2.6000 0.0000 0.0000 0.0061
0.0000 0.0000 0.0000 0.0000 0.1100 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 2.9000 0.0000 0.0000 0.0045
0.0000 0.0000 0.0000 0.0000 1.6000 0.0000 0.0000 0.0024
0.0000 0.0000 0 0.0000 1.6000 0.0000 0.0000 0.0037
0.0000 0.0000 0.0000 0.0000 -1.6000 0.0000 0.0000 0.0037
0.0000 0.0000 0.0000 0.0000 0.1100 0.0000 0.0000 0.0000
0.0000 0.0000 0.0000 0.0000 2.9000 0.0004 0.0000 0.0045
0.0000 0.0000 0.0000 0.0000 2.9000 0.0006 0.0000 0.0045
I tried format longg but then it shows up like this
Columns 1 through 6
1 1 2 3 29000000 10
2 3 0 4 29000000 5000
3 2 5 3 26000000 36
4 5 10 5 1100000 234
5 1 2 3 29000000 100
6 1 5 2 16000000 15
7 3 0 3 16000000 45
8 5 2 3 -16000000 34
9 5 10 5 1100000 234
10 1 2 3 29000000 4000
11 4 6 6 29000000 6000
Columns 7 through 8
2000 45000
0.1 45000
1.2 60750
1 375
17 45000
99 24000
60 36750
120 36750
5 375
0.5 45000
50 45000
How would I go about making it show up in a smaller matrix similar to this
1 1 2 3 29000000 10 2000 45000
2 3 0 4 29000000 5000 0.1000 45000
3 2 5 3 26000000 36 1.2000 60750
4 5 10 5 1100000 234 1 375
5 1 2 3 29000000 100 17 45000
6 1 5 2 16000000 15 99 24000
7 3 0 3 16000000 45 60 36750
8 5 2 3 -16000000 34 120 36750
9 5 10 5 1100000 234 5 375
10 1 2 3 29000000 4000 0.5000 45000
11 4 6 6 29000000 6000 50 45000
I can provide more code if needed!

Risposta accettata

Walter Roberson
Walter Roberson il 1 Dic 2020
disp(num2str(YourMatrix))

Più risposte (0)

Categorie

Scopri di più su Structures in Help Center e File Exchange

Prodotti


Release

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by