이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
How to display this whole data simultaneously?
조회 수: 7 (최근 30일)
이전 댓글 표시
When I run the following code, it displays the data in such a way that it shows the 1st 9 columns in one screen and the remaining 3 columns in other screen. I want to display the whole 12 columns in one screen. How can we do that?
clear;clc
s2=rand(100,1);
s3=rand(100,1);
s4=rand(100,1);
s21=rand(100,1);
s31=rand(100,1);
s41=rand(100,1);
s22=rand(100,1);
s32=rand(100,1);
s42=rand(100,1);
s23=rand(100,1);
s33=rand(100,1);
s43=rand(100,1);
format compact
S=[s2 s3 s4 s21 s31 s41 s22 s32 s42 s23 s33 s43]
답변 (1개)
John D'Errico
2024년 3월 3일
편집: John D'Errico
2024년 3월 3일
What can you do? This will mainly be in your MATLAB settings, first, under the command window tab. Here, you can control how many columns the array will be displayed as. So turn off the item "Set matrix display width to eighty columns".
Next, make the command window font smaller. This is in the fonts tab for settings. I leave mine at 12 or even 14 point. Older eyes need bigger numbers. :) But you can go much smaller, and so fit much more into the window space you do have available.
Next, make your command window as wide as possible. Since I have a 27 inch display, that works nicely, so I can be a display hog. But if you have a small laptop, you have less capability there.
Use a short format for numeric display.
format short
x = rand(1,5)
Of course, this limits your ability to read the numbers if they vary by orders of magnitude.
And, finally, you can use a tool like sprintf to display the array, giving less space between numbers. That takes a little more effort on your part of course.
disp(sprintf('%0.4g ',x))
댓글 수: 7
Sadiq Akbar
2024년 3월 3일
Thanks a lot for your guiadance. I checked it. The matrix display option is already disabled. However, when I decreased the font size, it worked, but my eye sight is weak, so I cannot see it clearly now. What else can we do?
Further, when I used the command:
disp(sprintf('%0.4g ',S))
it displayed the whole data in a single row which is very confusing and I cannot locate the data of different s.
Voss
2024년 3월 3일
편집: Voss
2024년 3월 3일
Here are a couple of other options:
1. Adjust the sprintf format:
disp(sprintf([repmat('%8.5f ',1,size(S,2)) '\n'],S.'))
0.51976 0.92948 0.97020 0.28578 0.16797 0.44005 0.72651 0.93310 0.98214 0.46760 0.34712 0.77589
0.67844 0.77328 0.67818 0.11586 0.95628 0.64363 0.56832 0.82544 0.89757 0.98402 0.57775 0.28754
0.20209 0.57968 0.15683 0.86531 0.59546 0.40877 0.48290 0.37532 0.93490 0.99559 0.91461 0.07340
0.65467 0.83835 0.86303 0.17354 0.65331 0.21480 0.22297 0.82001 0.53721 0.54815 0.78334 0.97966
0.21515 0.72319 0.33473 0.74998 0.77290 0.90372 0.79591 0.67562 0.33738 0.36206 0.50923 0.04739
0.67289 0.37958 0.39829 0.24304 0.89867 0.38513 0.59664 0.64306 0.40112 0.12243 0.26842 0.58025
0.69316 0.22058 0.63952 0.36683 0.81306 0.37355 0.92491 0.99165 0.11399 0.68405 0.60777 0.38919
0.60930 0.73155 0.56990 0.41384 0.38508 0.61097 0.51468 0.88142 0.33101 0.61681 0.28060 0.06258
0.59056 0.00469 0.46285 0.54799 0.02742 0.66278 0.79294 0.76562 0.05851 0.51541 0.48805 0.89330
0.88224 0.96952 0.01644 0.11941 0.54434 0.11740 0.05657 0.56453 0.10954 0.58102 0.47196 0.38528
0.05309 0.32611 0.76959 0.47115 0.50554 0.28165 0.27157 0.82965 0.30565 0.90816 0.30684 0.33535
0.64816 0.24901 0.94003 0.20505 0.98449 0.09186 0.62360 0.81448 0.64734 0.69714 0.04672 0.86238
0.24080 0.96751 0.31897 0.20306 0.98599 0.51588 0.58682 0.15407 0.08382 0.99445 0.71889 0.29971
0.69921 0.01251 0.07109 0.52285 0.77914 0.64141 0.68132 0.16809 0.69005 0.66856 0.62494 0.45954
0.81759 0.77855 0.25702 0.95171 0.33839 0.53078 0.17182 0.66694 0.65162 0.53876 0.38660 0.06284
0.60344 0.87723 0.43369 0.37886 0.97672 0.62990 0.14066 0.77485 0.03721 0.56199 0.71874 0.54873
0.68509 0.66296 0.95235 0.05200 0.39269 0.56848 0.13730 0.74747 0.78891 0.50234 0.99627 0.55012
0.95748 0.11082 0.57223 0.54273 0.25994 0.85041 0.25927 0.24128 0.21875 0.77515 0.23948 0.74300
0.40790 0.98570 0.61499 0.96236 0.45251 0.43008 0.34400 0.12817 0.04597 0.42763 0.64597 0.46241
0.27976 0.08341 0.94955 0.56114 0.28012 0.95119 0.61456 0.74604 0.22744 0.06306 0.80583 0.77900
0.15895 0.81665 0.15929 0.89071 0.08628 0.95619 0.24253 0.53373 0.13802 0.83054 0.84614 0.39440
0.07096 0.80106 0.79061 0.27012 0.16739 0.35456 0.62403 0.84938 0.33219 0.34288 0.33983 0.84164
0.03394 0.02725 0.91135 0.01674 0.83923 0.15701 0.64531 0.72478 0.39573 0.33874 0.39192 0.34106
0.73223 0.56926 0.53996 0.07791 0.96163 0.59858 0.31658 0.99743 0.79728 0.89503 0.17257 0.57043
0.01037 0.26241 0.81955 0.88467 0.10976 0.80435 0.29616 0.39261 0.28695 0.52571 0.51978 0.07213
0.69771 0.86999 0.86110 0.96881 0.00379 0.47720 0.84489 0.85845 0.39883 0.50622 0.55089 0.05582
0.09927 0.67425 0.02080 0.80152 0.42009 0.71188 0.12232 0.26524 0.73468 0.10733 0.19988 0.02453
0.34115 0.94155 0.14886 0.01457 0.15215 0.51826 0.99852 0.10947 0.54864 0.96434 0.92400 0.42615
0.18414 0.53846 0.23121 0.75301 0.16507 0.41477 0.75367 0.59917 0.11024 0.38730 0.70977 0.32818
0.45893 0.28953 0.57584 0.76424 0.47624 0.15641 0.59301 0.04875 0.36349 0.89306 0.64709 0.28787
0.12144 0.60336 0.58500 0.49312 0.84286 0.42424 0.87672 0.28394 0.83506 0.38567 0.39176 0.43735
0.65526 0.10818 0.88831 0.18500 0.29879 0.37519 0.52680 0.66410 0.96015 0.57485 0.15772 0.43809
0.94419 0.84225 0.08804 0.80580 0.66466 0.60401 0.90410 0.11570 0.52905 0.96768 0.35376 0.14276
0.21760 0.74571 0.22402 0.51188 0.12289 0.78412 0.80890 0.95246 0.65317 0.10215 0.96186 0.24212
0.61457 0.69844 0.47712 0.27727 0.21948 0.85617 0.87767 0.44785 0.47806 0.11153 0.13158 0.83819
0.87614 0.66945 0.35764 0.02828 0.63193 0.18811 0.60840 0.79149 0.15815 0.39653 0.60274 0.20003
0.77765 0.50097 0.67011 0.72245 0.48047 0.63661 0.22473 0.76014 0.39464 0.95281 0.65080 0.49169
0.59810 0.49660 0.13344 0.39301 0.61933 0.44707 0.87664 0.84844 0.32277 0.01296 0.54428 0.60002
0.00158 0.00864 0.68429 0.67741 0.75718 0.27643 0.42727 0.00426 0.49306 0.69872 0.00605 0.57825
0.23557 0.30156 0.41428 0.05841 0.69498 0.17551 0.74537 0.92757 0.48339 0.20944 0.26525 0.66745
0.73452 0.56763 0.27941 0.66090 0.90452 0.63741 0.18906 0.93559 0.45498 0.56582 0.38879 0.60518
0.01224 0.74823 0.20764 0.21060 0.65937 0.30672 0.41712 0.69175 0.22942 0.29358 0.39161 0.04195
0.54857 0.27784 0.21221 0.53019 0.66704 0.97625 0.16604 0.64276 0.79659 0.64736 0.41669 0.76796
0.94731 0.80096 0.08953 0.80498 0.20002 0.51519 0.71224 0.51915 0.40177 0.78125 0.84243 0.53409
0.13953 0.53294 0.94741 0.80691 0.33665 0.52461 0.61410 0.95804 0.88260 0.34683 0.38284 0.30477
0.55270 0.96367 0.43772 0.66477 0.89129 0.97756 0.05242 0.96547 0.77337 0.91679 0.77775 0.92256
0.14146 0.56015 0.24598 0.78328 0.23432 0.57640 0.63147 0.40449 0.58559 0.07377 0.55034 0.81468
0.60620 0.15694 0.44092 0.91513 0.98226 0.32417 0.14483 0.53639 0.68808 0.70190 0.02092 0.65379
0.40113 0.25196 0.40303 0.48806 0.59804 0.12138 0.87418 0.55482 0.70632 0.59119 0.65137 0.54065
0.03590 0.60508 0.71602 0.33178 0.51072 0.91746 0.48022 0.13030 0.24133 0.09263 0.57643 0.94051
0.70422 0.22728 0.85507 0.36642 0.46111 0.13312 0.50149 0.57126 0.30727 0.28368 0.65366 0.77539
0.46495 0.68176 0.19000 0.33155 0.69217 0.63842 0.52969 0.73637 0.84882 0.60193 0.48063 0.04527
0.16273 0.86637 0.42406 0.15573 0.52762 0.58791 0.17820 0.82553 0.67287 0.08137 0.24703 0.74793
0.04573 0.01718 0.36661 0.27090 0.49781 0.49489 0.73112 0.86981 0.00345 0.09425 0.99741 0.21171
0.89693 0.82961 0.00080 0.32024 0.37602 0.47291 0.92465 0.65598 0.20683 0.61314 0.27707 0.43248
0.17783 0.46014 0.20939 0.64075 0.22445 0.39290 0.67428 0.24417 0.24522 0.31878 0.97627 0.62615
0.67709 0.23684 0.19750 0.28671 0.47624 0.06434 0.93586 0.22548 0.72276 0.58600 0.18321 0.52378
0.13484 0.83043 0.52769 0.54004 0.91948 0.63942 0.99599 0.49726 0.53652 0.14134 0.62161 0.40267
0.08180 0.37107 0.60936 0.41431 0.70943 0.56727 0.36688 0.68174 0.59640 0.74432 0.84012 0.86877
0.59467 0.93563 0.53229 0.15633 0.88169 0.59144 0.01057 0.56572 0.41295 0.63079 0.53615 0.53097
0.59439 0.67389 0.37914 0.62919 0.64684 0.39188 0.99547 0.72374 0.17104 0.65110 0.81166 0.75501
0.46889 0.00104 0.94570 0.47483 0.12069 0.68152 0.59151 0.25134 0.56171 0.85075 0.20986 0.69953
0.14571 0.40098 0.83068 0.75551 0.25166 0.84178 0.81738 0.87555 0.65482 0.21547 0.18378 0.06617
0.67643 0.18821 0.15183 0.16233 0.07829 0.16629 0.66001 0.15617 0.33629 0.52988 0.05003 0.71814
0.43804 0.72669 0.14127 0.81403 0.38594 0.99626 0.63075 0.50295 0.91020 0.84777 0.24178 0.85456
0.46301 0.57463 0.61576 0.52328 0.64524 0.65219 0.31422 0.07963 0.14800 0.69314 0.73797 0.54831
0.87784 0.57549 0.01026 0.24100 0.88749 0.53023 0.39577 0.90883 0.30794 0.39472 0.98018 0.47760
0.87585 0.42858 0.60891 0.35333 0.32693 0.96959 0.16954 0.52995 0.36784 0.26052 0.27488 0.10940
0.45296 0.27915 0.57235 0.26513 0.35535 0.59026 0.24029 0.62750 0.09996 0.35434 0.84962 0.00848
0.18071 0.54679 0.24901 0.99549 0.81204 0.33903 0.87249 0.28006 0.10636 0.31599 0.89715 0.61382
0.55275 0.57718 0.43980 0.20649 0.90284 0.28857 0.85760 0.22322 0.71103 0.11821 0.93701 0.81155
0.15172 0.33194 0.38995 0.43298 0.26350 0.02764 0.96217 0.44746 0.48586 0.02375 0.60911 0.50186
0.28949 0.70319 0.70511 0.84854 0.58211 0.36488 0.31713 0.79120 0.52170 0.29101 0.46423 0.50730
0.24597 0.26964 0.67455 0.87426 0.82423 0.38277 0.41423 0.92402 0.80740 0.25244 0.04893 0.92583
0.45938 0.78243 0.46078 0.45197 0.46338 0.00679 0.17635 0.59611 0.44006 0.45237 0.83878 0.18622
0.32542 0.86145 0.73062 0.79447 0.80534 0.06668 0.03431 0.98032 0.60772 0.54273 0.10706 0.42503
0.47586 0.01680 0.14939 0.11109 0.07379 0.93044 0.10844 0.25558 0.59728 0.29302 0.04908 0.45228
0.33325 0.81719 0.78577 0.21989 0.79924 0.55524 0.86292 0.95354 0.79962 0.12787 0.44688 0.42245
0.23074 0.39903 0.50658 0.34464 0.36366 0.21087 0.20365 0.32703 0.91305 0.55217 0.73810 0.24436
0.56369 0.42460 0.18643 0.44102 0.81985 0.11743 0.98875 0.98009 0.42005 0.51835 0.54765 0.11887
0.06930 0.89778 0.71119 0.22250 0.83726 0.54174 0.71947 0.37706 0.10812 0.32762 0.25571 0.42032
0.06817 0.86036 0.31932 0.05409 0.70482 0.07870 0.14063 0.20565 0.43287 0.76895 0.49782 0.65584
0.16380 0.21251 0.29309 0.29641 0.50678 0.89463 0.75023 0.52655 0.44777 0.20620 0.12386 0.92396
0.51808 0.81744 0.33544 0.18479 0.72931 0.00481 0.55919 0.98581 0.95455 0.22906 0.21359 0.95936
0.22278 0.57767 0.09252 0.67779 0.66658 0.94617 0.53599 0.71631 0.66910 0.09800 0.22103 0.93787
0.94536 0.84749 0.94364 0.04475 0.04367 0.90599 0.70025 0.86112 0.59770 0.22531 0.48211 0.79563
0.47733 0.13456 0.68170 0.26597 0.07403 0.87674 0.15055 0.48017 0.51768 0.58714 0.67022 0.76858
0.55575 0.70254 0.49881 0.97225 0.35311 0.84762 0.06405 0.31237 0.74325 0.44725 0.81836 0.22951
0.42433 0.07099 0.98337 0.41176 0.36686 0.53811 0.73856 0.50595 0.34505 0.56919 0.60005 0.80216
0.77561 0.49742 0.33870 0.70919 0.99363 0.56966 0.67155 0.67549 0.38222 0.66456 0.82943 0.83696
0.26889 0.68939 0.41590 0.14468 0.76728 0.36204 0.84535 0.79739 0.53744 0.95305 0.44286 0.94383
0.92896 0.71143 0.89472 0.40351 0.75974 0.91770 0.81079 0.03486 0.66710 0.77200 0.25122 0.14389
0.80126 0.02706 0.27147 0.47293 0.60663 0.19676 0.36200 0.48791 0.46297 0.95011 0.19885 0.52964
0.51187 0.68391 0.03160 0.85805 0.45963 0.38866 0.78231 0.65260 0.60880 0.11610 0.37403 0.27687
0.48121 0.35150 0.51508 0.01974 0.28562 0.72591 0.71452 0.88975 0.77657 0.48211 0.19135 0.09887
0.97040 0.05834 0.48003 0.60922 0.91525 0.89678 0.72496 0.46204 0.58324 0.48566 0.62988 0.98864
0.96058 0.22150 0.74726 0.26238 0.78974 0.39303 0.11763 0.34138 0.12264 0.88220 0.38770 0.25146
0.43001 0.50118 0.60920 0.68514 0.99832 0.46035 0.04601 0.14949 0.07180 0.36169 0.50666 0.22283
0.05086 0.06484 0.33812 0.97242 0.63604 0.26678 0.95680 0.73949 0.53300 0.41982 0.73261 0.75386
0.25133 0.70511 0.38587 0.48164 0.19940 0.63499 0.79507 0.09635 0.79020 0.37113 0.25942 0.28920
2. Display as a table:
disp(array2table(S))
S1 S2 S3 S4 S5 S6 S7 S8 S9 S10 S11 S12
_________ _________ __________ ________ ________ _________ ________ _________ ________ ________ ________ _________
0.51976 0.92948 0.9702 0.28578 0.16797 0.44005 0.72651 0.9331 0.98214 0.4676 0.34712 0.77589
0.67844 0.77328 0.67818 0.11586 0.95628 0.64363 0.56832 0.82544 0.89757 0.98402 0.57775 0.28754
0.20209 0.57968 0.15683 0.86531 0.59546 0.40877 0.4829 0.37532 0.9349 0.99559 0.91461 0.073396
0.65467 0.83835 0.86303 0.17354 0.65331 0.2148 0.22297 0.82001 0.53721 0.54815 0.78334 0.97966
0.21515 0.72319 0.33473 0.74998 0.7729 0.90372 0.79591 0.67562 0.33738 0.36206 0.50923 0.047393
0.67289 0.37958 0.39829 0.24304 0.89867 0.38513 0.59664 0.64306 0.40112 0.12243 0.26842 0.58025
0.69316 0.22058 0.63952 0.36683 0.81306 0.37355 0.92491 0.99165 0.11399 0.68405 0.60777 0.38919
0.6093 0.73155 0.5699 0.41384 0.38508 0.61097 0.51468 0.88142 0.33101 0.61681 0.2806 0.062576
0.59056 0.0046856 0.46285 0.54799 0.027415 0.66278 0.79294 0.76562 0.058515 0.51541 0.48805 0.8933
0.88224 0.96952 0.016442 0.11941 0.54434 0.1174 0.05657 0.56453 0.10954 0.58102 0.47196 0.38528
0.053086 0.32611 0.76959 0.47115 0.50554 0.28165 0.27157 0.82965 0.30565 0.90816 0.30684 0.33535
0.64816 0.24901 0.94003 0.20505 0.98449 0.091863 0.6236 0.81448 0.64734 0.69714 0.046722 0.86238
0.2408 0.96751 0.31897 0.20306 0.98599 0.51588 0.58682 0.15407 0.083815 0.99445 0.71889 0.29971
0.69921 0.012507 0.071089 0.52285 0.77914 0.64141 0.68132 0.16809 0.69005 0.66856 0.62494 0.45954
0.81759 0.77855 0.25702 0.95171 0.33839 0.53078 0.17182 0.66694 0.65162 0.53876 0.3866 0.062841
0.60344 0.87723 0.43369 0.37886 0.97672 0.6299 0.14066 0.77485 0.037209 0.56199 0.71874 0.54873
0.68509 0.66296 0.95235 0.052004 0.39269 0.56848 0.1373 0.74747 0.78891 0.50234 0.99627 0.55012
0.95748 0.11082 0.57223 0.54273 0.25994 0.85041 0.25927 0.24128 0.21875 0.77515 0.23948 0.743
0.4079 0.9857 0.61499 0.96236 0.45251 0.43008 0.344 0.12817 0.045974 0.42763 0.64597 0.46241
0.27976 0.083409 0.94955 0.56114 0.28012 0.95119 0.61456 0.74604 0.22744 0.063056 0.80583 0.779
0.15895 0.81665 0.15929 0.89071 0.08628 0.95619 0.24253 0.53373 0.13802 0.83054 0.84614 0.3944
0.070957 0.80106 0.79061 0.27012 0.16739 0.35456 0.62403 0.84938 0.33219 0.34288 0.33983 0.84164
0.033944 0.027246 0.91135 0.016736 0.83923 0.15701 0.64531 0.72478 0.39573 0.33874 0.39192 0.34106
0.73223 0.56926 0.53996 0.077907 0.96163 0.59858 0.31658 0.99743 0.79728 0.89503 0.17257 0.57043
0.010374 0.26241 0.81955 0.88467 0.10976 0.80435 0.29616 0.39261 0.28695 0.52571 0.51978 0.072129
0.69771 0.86999 0.8611 0.96881 0.003786 0.4772 0.84489 0.85845 0.39883 0.50622 0.55089 0.055822
0.099273 0.67425 0.020798 0.80152 0.42009 0.71188 0.12232 0.26524 0.73468 0.10733 0.19988 0.024528
0.34115 0.94155 0.14886 0.014568 0.15215 0.51826 0.99852 0.10947 0.54864 0.96434 0.924 0.42615
0.18414 0.53846 0.23121 0.75301 0.16507 0.41477 0.75367 0.59917 0.11024 0.3873 0.70977 0.32818
0.45893 0.28953 0.57584 0.76424 0.47624 0.15641 0.59301 0.048748 0.36349 0.89306 0.64709 0.28787
0.12144 0.60336 0.585 0.49312 0.84286 0.42424 0.87672 0.28394 0.83506 0.38567 0.39176 0.43735
0.65526 0.10818 0.88831 0.185 0.29879 0.37519 0.5268 0.6641 0.96015 0.57485 0.15772 0.43809
0.94419 0.84225 0.088039 0.8058 0.66466 0.60401 0.9041 0.1157 0.52905 0.96768 0.35376 0.14276
0.2176 0.74571 0.22402 0.51188 0.12289 0.78412 0.8089 0.95246 0.65317 0.10215 0.96186 0.24212
0.61457 0.69844 0.47712 0.27727 0.21948 0.85617 0.87767 0.44785 0.47806 0.11153 0.13158 0.83819
0.87614 0.66945 0.35764 0.028276 0.63193 0.18811 0.6084 0.79149 0.15815 0.39653 0.60274 0.20003
0.77765 0.50097 0.67011 0.72245 0.48047 0.63661 0.22473 0.76014 0.39464 0.95281 0.6508 0.49169
0.5981 0.4966 0.13344 0.39301 0.61933 0.44707 0.87664 0.84844 0.32277 0.012956 0.54428 0.60002
0.0015841 0.008644 0.68429 0.67741 0.75718 0.27643 0.42727 0.0042597 0.49306 0.69872 0.006049 0.57825
0.23557 0.30156 0.41428 0.058411 0.69498 0.17551 0.74537 0.92757 0.48339 0.20944 0.26525 0.66745
0.73452 0.56763 0.27941 0.6609 0.90452 0.63741 0.18906 0.93559 0.45498 0.56582 0.38879 0.60518
0.012241 0.74823 0.20764 0.2106 0.65937 0.30672 0.41712 0.69175 0.22942 0.29358 0.39161 0.041947
0.54857 0.27784 0.21221 0.53019 0.66704 0.97625 0.16604 0.64276 0.79659 0.64736 0.41669 0.76796
0.94731 0.80096 0.089532 0.80498 0.20002 0.51519 0.71224 0.51915 0.40177 0.78125 0.84243 0.53409
0.13953 0.53294 0.94741 0.80691 0.33665 0.52461 0.6141 0.95804 0.8826 0.34683 0.38284 0.30477
0.5527 0.96367 0.43772 0.66477 0.89129 0.97756 0.052416 0.96547 0.77337 0.91679 0.77775 0.92256
0.14146 0.56015 0.24598 0.78328 0.23432 0.5764 0.63147 0.40449 0.58559 0.073773 0.55034 0.81468
0.6062 0.15694 0.44092 0.91513 0.98226 0.32417 0.14483 0.53639 0.68808 0.7019 0.020918 0.65379
0.40113 0.25196 0.40303 0.48806 0.59804 0.12138 0.87418 0.55482 0.70632 0.59119 0.65137 0.54065
0.035901 0.60508 0.71602 0.33178 0.51072 0.91746 0.48022 0.1303 0.24133 0.092626 0.57643 0.94051
0.70422 0.22728 0.85507 0.36642 0.46111 0.13312 0.50149 0.57126 0.30727 0.28368 0.65366 0.77539
0.46495 0.68176 0.19 0.33155 0.69217 0.63842 0.52969 0.73637 0.84882 0.60193 0.48063 0.045265
0.16273 0.86637 0.42406 0.15573 0.52762 0.58791 0.1782 0.82553 0.67287 0.081367 0.24703 0.74793
0.045735 0.017179 0.36661 0.2709 0.49781 0.49489 0.73112 0.86981 0.003452 0.094248 0.99741 0.21171
0.89693 0.82961 0.00079924 0.32024 0.37602 0.47291 0.92465 0.65598 0.20683 0.61314 0.27707 0.43248
0.17783 0.46014 0.20939 0.64075 0.22445 0.3929 0.67428 0.24417 0.24522 0.31878 0.97627 0.62615
0.67709 0.23684 0.1975 0.28671 0.47624 0.064341 0.93586 0.22548 0.72276 0.586 0.18321 0.52378
0.13484 0.83043 0.52769 0.54004 0.91948 0.63942 0.99599 0.49726 0.53652 0.14134 0.62161 0.40267
0.081803 0.37107 0.60936 0.41431 0.70943 0.56727 0.36688 0.68174 0.5964 0.74432 0.84012 0.86877
0.59467 0.93563 0.53229 0.15633 0.88169 0.59144 0.01057 0.56572 0.41295 0.63079 0.53615 0.53097
0.59439 0.67389 0.37914 0.62919 0.64684 0.39188 0.99547 0.72374 0.17104 0.6511 0.81166 0.75501
0.46889 0.0010353 0.9457 0.47483 0.12069 0.68152 0.59151 0.25134 0.56171 0.85075 0.20986 0.69953
0.14571 0.40098 0.83068 0.75551 0.25166 0.84178 0.81738 0.87555 0.65482 0.21547 0.18378 0.06617
0.67643 0.18821 0.15183 0.16233 0.07829 0.16629 0.66001 0.15617 0.33629 0.52988 0.050032 0.71814
0.43804 0.72669 0.14127 0.81403 0.38594 0.99626 0.63075 0.50295 0.9102 0.84777 0.24178 0.85456
0.46301 0.57463 0.61576 0.52328 0.64524 0.65219 0.31422 0.079625 0.148 0.69314 0.73797 0.54831
0.87784 0.57549 0.01026 0.241 0.88749 0.53023 0.39577 0.90883 0.30794 0.39472 0.98018 0.4776
0.87585 0.42858 0.60891 0.35333 0.32693 0.96959 0.16954 0.52995 0.36784 0.26052 0.27488 0.1094
0.45296 0.27915 0.57235 0.26513 0.35535 0.59026 0.24029 0.6275 0.099961 0.35434 0.84962 0.0084795
0.18071 0.54679 0.24901 0.99549 0.81204 0.33903 0.87249 0.28006 0.10636 0.31599 0.89715 0.61382
0.55275 0.57718 0.4398 0.20649 0.90284 0.28857 0.8576 0.22322 0.71103 0.11821 0.93701 0.81155
0.15172 0.33194 0.38995 0.43298 0.2635 0.027643 0.96217 0.44746 0.48586 0.023747 0.60911 0.50186
0.28949 0.70319 0.70511 0.84854 0.58211 0.36488 0.31713 0.7912 0.5217 0.29101 0.46423 0.5073
0.24597 0.26964 0.67455 0.87426 0.82423 0.38277 0.41423 0.92402 0.8074 0.25244 0.048928 0.92583
0.45938 0.78243 0.46078 0.45197 0.46338 0.0067885 0.17635 0.59611 0.44006 0.45237 0.83878 0.18622
0.32542 0.86145 0.73062 0.79447 0.80534 0.06668 0.034313 0.98032 0.60772 0.54273 0.10706 0.42503
0.47586 0.016799 0.14939 0.11109 0.073789 0.93044 0.10844 0.25558 0.59728 0.29302 0.049078 0.45228
0.33325 0.81719 0.78577 0.21989 0.79924 0.55524 0.86292 0.95354 0.79962 0.12787 0.44688 0.42245
0.23074 0.39903 0.50658 0.34464 0.36366 0.21087 0.20365 0.32703 0.91305 0.55217 0.7381 0.24436
0.56369 0.4246 0.18643 0.44102 0.81985 0.11743 0.98875 0.98009 0.42005 0.51835 0.54765 0.11887
0.069301 0.89778 0.71119 0.2225 0.83726 0.54174 0.71947 0.37706 0.10812 0.32762 0.25571 0.42032
0.068174 0.86036 0.31932 0.054093 0.70482 0.0787 0.14063 0.20565 0.43287 0.76895 0.49782 0.65584
0.1638 0.21251 0.29309 0.29641 0.50678 0.89463 0.75023 0.52655 0.44777 0.2062 0.12386 0.92396
0.51808 0.81744 0.33544 0.18479 0.72931 0.004806 0.55919 0.98581 0.95455 0.22906 0.21359 0.95936
0.22278 0.57767 0.092522 0.67779 0.66658 0.94617 0.53599 0.71631 0.6691 0.097995 0.22103 0.93787
0.94536 0.84749 0.94364 0.044749 0.043668 0.90599 0.70025 0.86112 0.5977 0.22531 0.48211 0.79563
0.47733 0.13456 0.6817 0.26597 0.074034 0.87674 0.15055 0.48017 0.51768 0.58714 0.67022 0.76858
0.55575 0.70254 0.49881 0.97225 0.35311 0.84762 0.06405 0.31237 0.74325 0.44725 0.81836 0.22951
0.42433 0.070994 0.98337 0.41176 0.36686 0.53811 0.73856 0.50595 0.34505 0.56919 0.60005 0.80216
0.77561 0.49742 0.3387 0.70919 0.99363 0.56966 0.67155 0.67549 0.38222 0.66456 0.82943 0.83696
0.26889 0.68939 0.4159 0.14468 0.76728 0.36204 0.84535 0.79739 0.53744 0.95305 0.44286 0.94383
0.92896 0.71143 0.89472 0.40351 0.75974 0.9177 0.81079 0.034864 0.6671 0.772 0.25122 0.14389
0.80126 0.027061 0.27147 0.47293 0.60663 0.19676 0.362 0.48791 0.46297 0.95011 0.19885 0.52964
0.51187 0.68391 0.031596 0.85805 0.45963 0.38866 0.78231 0.6526 0.6088 0.1161 0.37403 0.27687
0.48121 0.3515 0.51508 0.019739 0.28562 0.72591 0.71452 0.88975 0.77657 0.48211 0.19135 0.098873
0.9704 0.058344 0.48003 0.60922 0.91525 0.89678 0.72496 0.46204 0.58324 0.48566 0.62988 0.98864
0.96058 0.2215 0.74726 0.26238 0.78974 0.39303 0.11763 0.34138 0.12264 0.8822 0.3877 0.25146
0.43001 0.50118 0.6092 0.68514 0.99832 0.46035 0.046007 0.14949 0.071798 0.36169 0.50666 0.22283
0.050855 0.064843 0.33812 0.97242 0.63604 0.26678 0.9568 0.73949 0.533 0.41982 0.73261 0.75386
0.25133 0.70511 0.38587 0.48164 0.1994 0.63499 0.79507 0.096346 0.7902 0.37113 0.25942 0.2892
Sadiq Akbar
2024년 3월 3일
Further, if I want to display them graphically such that each displayed graph tells me that this is the graph of s2, s3, s4,
s21, s31, s41,
s22, s32, s42,
s23, s33, s43 etc.
How can we do that using a semilogarithmic graph for vertical axis and Runs on horizontal axis respectively. Further, can we display them graphically in such way that all the graphs of s2,s3 and s4 are in one colour such that colour of s2 is dark, colour of s3 is the same colour but lighter than s2 and then colour of s4 is further lighter than s3. And thei same patern is also for the others i.e. s41 is lighter than s31 which is lighter than s21. Likewise, s42 is lighter than s32 which is lighter than s22 and so on.
Voss
2024년 3월 3일
"I want to display them graphically such that each displayed graph tells me that this is the graph of s2, s3, s4, s21, s31, s41,
s22, s32, s42,
s23, s33, s43 etc."
I'm not sure what you're asking here. Use a legend? Maybe a legend with NumColumns=3?
"How can we do that using a semilogarithmic graph for vertical axis"
Use semilogy or set(gca(),'YScale','log').
"can we display them graphically in such way that all the graphs of s2,s3 and s4 are in one colour such that colour of s2 is dark, colour of s3 is the same colour but lighter than s2 and then colour of s4 is further lighter than s3. And thei same patern is also for the others i.e. s41 is lighter than s31 which is lighter than s21. Likewise, s42 is lighter than s32 which is lighter than s22 and so on."
Specify the colors when you plot them.
Sadiq Akbar
2024년 3월 3일
편집: Sadiq Akbar
2024년 3월 3일
I mean I want to display them in a single graph window. As there are 12 sets of data, it means the graph window will have 12 line graphs. But these line graphs should be such that each graph is recognizable that this graph is for say for example s2, s3, s4,s21, s31, s41,s22, s32, s42, s23, s33, s43. But the colours of these line graphs should be such that the 1st three graphs namely s2,s3 and s4 should be of blue colours but the colour of s4 must be lighter in colour than s3 and colour of s3 line graph should be lighter than s2. Then the colour of line graph of the next 3 graphs namely s21,s31 and s41 should be green such that the colour of s41 is lighter than s31 and the colour of 31 should be lighter than s21. Likewise, the colour of the next 3 graphs namely must be of purple colour on the same pattern and the colour of the next 3 graphs should be orange on the same pattern.
John D'Errico
2024년 3월 3일
편집: John D'Errico
2024년 3월 3일
So what is the problem? Learn to specify the color of a segmented line. You can do that using the function line. And then you can plot the lines in any color you want. Multiple calls to line will plot on the same set of axes. You need not even use the hold command.
For example...
for r = 0:.1:1
line(sort(rand(1,5)),3*r + sort(rand(1,5)),'color',[r,.1,.3])
end
All you need to do now is learn how to control the colors using an RGB triple, so you need to understand the RGB color space.
Sadiq Akbar
2024년 3월 4일
Thanks alot for your guiadance. I tried it like below, but in vain:
clear;clc
s2=rand(100,1);
s3=rand(100,1);
s4=rand(100,1);
s21=rand(100,1);
s31=rand(100,1);
s41=rand(100,1);
s22=rand(100,1);
s32=rand(100,1);
s42=rand(100,1);
s23=rand(100,1);
s33=rand(100,1);
s43=rand(100,1);
S=[s2 s3 s4 s21 s31 s41 s22 s32 s42 s23 s33 s43];
S=sort(S);
Runs=1:100;
% for r = linspace(0,1,12) %0:.1:1
% line(sort(S),3*r + sort(S),'color',[r,.1,.3],'linewidth',2)
% end
% figure
% semilogy(Runs,S,'linewidth',2)%----------------------(1)
figure
for r = linspace(0,1,12)
semilogy(Runs,S,3*r+S, 'color',[r,.1,.3],'linewidth',2)
end
I want a graph like in (1) i.e. the Runs shoud be along horizontal axis and the values of S should be on vertical axis but logarithmically but with my desired colour or the colour varying like yours. So tried like you but it gives me error.
Error using semilogy
Data must be a single input of y-values or one or more pairs of x- and y-values.
Error in graphDesiredColour3 (line 28)
semilogy(Runs,S,3*r+S, 'color',[r,.1,.3],'linewidth',2)
>>
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
아시아 태평양
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)