How to change output format 20 culumn!

1 view (last 30 days)
Sungchul
Sungchul on 25 Oct 2021
Commented: KSSV on 25 Oct 2021
Fot Example . . . . . . .
>> M=rand(2,15)
M =
1 ~ 11 column
0.9593 0.1386 0.2575 0.2543 0.2435 0.3500 0.2511 0.4733 0.8308 0.5497 0.2858
0.5472 0.1493 0.8407 0.8143 0.9293 0.1966 0.6160 0.3517 0.5853 0.9172 0.7572
12 ~ 15 column
0.7537 0.5678 0.0540 0.7792
0.3804 0.0759 0.5308 0.9340
But I want to output 20 column
How to change output format with 20 or 30 column!

Answers (1)

KSSV
KSSV on 25 Oct 2021
r = 2; % number of rows
c = 30 ; % number of columns
M=rand(r,c)
M = 2×30
0.8997 0.0421 0.4975 0.3356 0.0114 0.7337 0.6048 0.9305 0.5184 0.6434 0.6723 0.1849 0.2561 0.7325 0.7787 0.0879 0.0513 0.4475 0.3142 0.6135 0.2797 0.4238 0.1452 0.3026 0.7395 0.9268 0.9655 0.7840 0.2412 0.8572 0.3177 0.4403 0.4600 0.0840 0.9030 0.9296 0.8697 0.7306 0.0867 0.8321 0.6553 0.0960 0.7445 0.4134 0.2114 0.8409 0.0928 0.9221 0.7002 0.8653 0.1193 0.7282 0.5245 0.9850 0.4686 0.8343 0.8213 0.4731 0.1782 0.1479

Community Treasure Hunt

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

Start Hunting!