can any body detect error i am not understanding why output is getting like this
1 次查看(过去 30 天)
显示 更早的评论
for k4=1:24
for i=1:10
kk(k4,i)=f(k4,i)/favg(k4,1);
end
end
in the output 1,10,11,12,13,14,22,23,24 rows are same, why this rows r same fraction values,
f=[0.757321448094497 0.622450790767213 0.559024185398725 0.620062730264781 0.879584295855025 0.513346651010516 0.742894238012083 0.490797616306833 0.540292675202356 0.654647923477949
0.894186770039285 0.734941897532372 0.660052652639458 0.732122259830706 0.964213491200260 0.606120142156995 0.877152232833544 0.579495980699634 0.637935929756998 0.772957789166735
0.958935696687547 0.858682114974047 0.771183966604265 0.855387742353223 0.850433344076531 0.708170982418122 0.976339250877436 0.677064181531716 0.745343509767105 0.903098641424400
0.848140265535573 0.998831885165085 0.899153358442527 0.997329813136727 0.773297803006597 0.825684071203662 0.859765986029646 0.789415443095930 0.869024965536319 0.952114063508325
0.815289892016047 0.944313331668056 0.954382253867462 0.947556235211515 0.749587745027913 0.876400246363737 0.825397739599715 0.837903882297328 0.922403278026190 0.904770551540544
0.837421873135620 0.980843791143446 0.915991436315983 0.984490113538943 0.765605221207829 0.841146319728075 0.848542575864425 0.804198503828064 0.885298841295426 0.936546929755457
0.901738312068497 0.922427075474304 0.828433431374014 0.918888142440580 0.811146380211471 0.760742627401126 0.916031831535717 0.727326588020970 0.800674687348069 0.970140898648046
0.971743785807999 0.798686858032629 0.717302117409207 0.795622659918063 0.897694502613225 0.658691787140000 0.953231763232372 0.629758387188888 0.693267107337963 0.840000046390381
0.875938060446647 0.719943083297018 0.646582190340694 0.717180989221916 0.983231377466568 0.593750343337465 0.859251166857350 0.567669532113928 0.624916829149713 0.757183140408231
0.734510561103698 0.603702272973020 0.542186107525269 0.601386142003794 0.853090792967826 0.497884402486103 0.720517905541840 0.476014555574700 0.524018799443249 0.634929612529818
0.670640077529464 0.551206423149279 0.495039489479594 0.549091694873029 0.778908984883667 0.454590106617746 0.657864174625158 0.434621985524726 0.478451947317749 0.579718341875052
0.729948383705539 0.599952569414181 0.538818491950578 0.597650824351597 0.847792092390386 0.494791952781220 0.716042639047791 0.473057943428273 0.520764024291427 0.630985950340192
0.775570157687135 0.637449605002568 0.572494647697489 0.635004000873571 0.900779098164785 0.525716449830047 0.760795303988278 0.502624064892540 0.553311775809641 0.670422572236454
0.844002818659529 0.693695158385147 0.623008881317856 0.691033765656533 0.980259606826384 0.572103195403286 0.827924301399009 0.546973247088941 0.602133403086963 0.729577505080847
0.948932898817200 0.779938340238436 0.700464039535752 0.776946071657076 0.915192925463580 0.643229538615587 0.930855430762128 0.614975326456755 0.676993231578855 0.820281735442250
0.947687567701550 0.869931225650563 0.781286813328338 0.866593695309815 0.842795149526017 0.717448331532770 0.964457978694485 0.685934017970996 0.755107835222569 0.914929627993279
0.901738312068497 0.922427075474304 0.828433431374014 0.918888142440580 0.811146380211471 0.760742627401126 0.916031831535717 0.727326588020970 0.800674687348069 0.970140898648046
0.917024784645614 0.903678557680111 0.811595353500558 0.900211554179592 0.821755771654129 0.745280378876713 0.932122817552421 0.712543527288836 0.784400811588962 0.950422587699914
0.933520599344939 0.884930039885917 0.794757275627103 0.881534965918605 0.833114216897085 0.729818130352300 0.949508594205745 0.697760466556702 0.768126935829855 0.930704276751783
0.974842904059474 0.843683300738693 0.757713504305501 0.840446471744433 0.861163311689378 0.695801183598591 0.993159910351148 0.665237732946009 0.732324409159819 0.887323992665895
0.930684189224562 0.764939526003081 0.686993577236987 0.762004801048286 0.930340804694132 0.630859739796056 0.912954364785934 0.603148877871048 0.663974130971570 0.804507086683745
0.830316286465050 0.682446047708631 0.612906034593783 0.679827812699941 0.964363505094064 0.562825846288638 0.814498501916863 0.538103410649660 0.592369077631498 0.717746518511969
0.734510561103698 0.603702272973020 0.542186107525269 0.601386142003794 0.853090792967826 0.497884402486103 0.720517905541840 0.476014555574700 0.524018799443249 0.634929612529818
0.597645239158910 0.491211166207861 0.441157640284536 0.489326612437870 0.694129775644628 0.405110911339624 0.586259910720379 0.387316191181898 0.426375544888606 0.516619746841032];
favg=[0.638042255438998
0.745917914585599
0.830463943071439
0.881275765466039
0.877800515561851
0.880008560581327
0.855754997452279
0.795599901507073
0.734564671263953
0.618824115214932
0.565013322587546
0.614980487170119
0.653416767618251
0.711071188290450
0.780780953856762
0.834617224293038
0.855754997452279
0.847903614466685
0.840377550137003
0.825169672125894
0.769040709831540
0.699540304156010
0.618824115214932
0.503515273870535];
output
kk=1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399015 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.19877368883955 0.985285221284269 0.884886446260184 0.981505130142159 1.29265361824154 0.812582899947818 1.17593667571432 0.776889748011453 0.855236102100335 1.03625046945837
1.15469877372515 1.03397880442376 0.928618241692795 1.03001189815611 1.02404607830562 0.852741396332005 1.17565519734244 0.815284260298671 0.897502553826095 1.08746279589734
0.962400532014014 1.13339311519236 1.02028603721678 1.13168868612802 0.877475397950674 0.936919070691818 0.975592453260055 0.895764383896872 0.986098789493841 1.08038153415557
0.928787210262923 1.07577213151172 1.08724275840348 1.07946648288879 0.853938601924980 0.998404797931546 0.940302181380477 0.954549316664520 1.05081195747053 1.03072456156104
0.951606507762181 1.11458437460598 1.04088923374892 1.11872788247491 0.869997469913334 0.955838792264043 0.964243547021730 0.913853046266750 1.00601162414898 1.06424752179318
1.05373420517919 1.07791024092236 0.968073144580393 1.07377478971932 0.947872209483304 0.888972462522544 1.07043702258578 0.849923856929072 0.935635421039675 1.13366664703836
1.22139756926473 1.00388003633448 0.901586483420185 1.00002860534667 1.12832404945345 0.827918386983541 1.19812956415241 0.791551615323183 0.871376562546997 1.05580712717435
1.19245873741714 0.980094893562229 0.880225003508719 0.976334715346268 1.33852255074388 0.808302340916844 1.16974202608853 0.772797214896203 0.850730852702770 1.03079166481742
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399015 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399015 1.37856746689894 0.804565288011080 1.16433391625598 0.769224314099926 0.846797638552346 1.02602596912257
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399014 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399014 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399014 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.21536378945956 0.998920806643446 0.897132590229981 0.995088401963773 1.17215067932033 0.823828418762365 1.19221072973675 0.787641301211319 0.867071908241057 1.05059137443142
1.13547568887557 1.04231161343146 0.936101952592851 1.03831273796663 1.00979841416514 0.859613617656266 1.15556922457649 0.821854615511938 0.904735504185387 1.09622663103828
1.05373420517919 1.07791024092236 0.968073144580393 1.07377478971932 0.947872209483304 0.888972462522544 1.07043702258578 0.849923856929072 0.935635421039675 1.13366664703836
1.08152007964066 1.06577981537266 0.957178787368463 1.06169090309375 0.969161774562074 0.878968276772214 1.09932638763276 0.840359110554107 0.925106106644368 1.12090875835895
1.11083476610334 1.05301484998219 0.945714548773390 1.04897491106812 0.991357059408911 0.868440774308310 1.12985954235802 0.830294034440769 0.914026006173809 1.10748350738315
1.18138479513913 1.02243614766537 0.918251760699584 1.01851352532041 1.04361968305349 0.843221954347875 1.20358266172393 0.806182965052689 0.887483427830211 1.07532307916731
1.21018845599010 0.994667143395625 0.893312367543553 0.990851058086645 1.20974194577804 0.820320344204206 1.18713398798604 0.784287320762472 0.863379691716209 1.04611768453711
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399014 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399015 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1.18694560060670 0.975563586049552 0.876155428003894 0.971820792399015 1.37856746689894 0.804565288011080 1.16433391625597 0.769224314099926 0.846797638552345 1.02602596912257
1 个评论
Walter Roberson
2019-1-13
That is just how the data is.
>> f(1,:)./f(10,:)
ans =
1.0311 1.0311 1.0311 1.0311 1.0311 1.0311 1.0311 1.0311 1.0311 1.0311
>> favg(1)/favg(10)
ans =
1.0311
Note: starting from R2016b, your code can be written without a loop as
kk = f ./ favg;
In versions before that,
kk = bsxfun(@divide, f, favg);
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!