MATLAB: Covert data as matrix

covert data as matrix

Hi
need help …. to CONVERT data 5*15 ,that I get it from the following program ….as MATRIX contain row i=5 and column j =15
this is the program:
Q =(unifrnd(0,1,5,15))
save Q
if there is alot of number … that is difficult to write matrix by using ; in every row.
WHAT I WRITE in the same program???? IF ANY PROF. KNOW…thanks alot

Best Answer

Q =(unifrnd(0,1,5,15))
Q = 5×15
0.6639 0.4524 0.1932 0.7793 0.4019 0.0852 0.7317 0.5443 0.6400 0.9254 0.4015 0.3222 0.5093 0.5372 0.8024 0.1512 0.8782 0.8470 0.3862 0.3625 0.4341 0.9869 0.7286 0.4532 0.8665 0.5559 0.6165 0.0237 0.7311 0.2724 0.5689 0.8799 0.7683 0.6209 0.7952 0.0832 0.7453 0.1717 0.6402 0.4705 0.7399 0.6973 0.7990 0.9779 0.6402 0.6130 0.2077 0.8421 0.2649 0.0269 0.1636 0.5503 0.0439 0.2371 0.0030 0.7877 0.7767 0.4297 0.3760 0.0445 0.0602 0.1058 0.4839 0.0780 0.9417 0.1768 0.0868 0.8750 0.1341 0.3844 0.3747 0.5078 0.4752 0.1798 0.6737
save('Q.txt', 'Q', '-ascii', '-double')
!cat Q.txt
6.6392079079920463e-01 4.5235571596635848e-01 1.9316148221534890e-01 7.7929796267166485e-01 4.0187340004345129e-01 8.5151634550524102e-02 7.3169640609405273e-01 5.4429391635246049e-01 6.3998783353082334e-01 9.2536320087337998e-01 4.0149054447634047e-01 3.2223963473914463e-01 5.0930643031449951e-01 5.3716002761190185e-01 8.0235908232593778e-01 1.5121990903952298e-01 8.7824242681845399e-01 8.4704362397489430e-01 3.8621816305805401e-01 3.6246145933476215e-01 4.3414004021693398e-01 9.8688763144956315e-01 7.2858731426382739e-01 4.5318793660766010e-01 8.6646738130811141e-01 5.5589156556919395e-01 6.1649313001817796e-01 2.3700376853586835e-02 7.3108013038230801e-01 2.7240432119647917e-01 5.6888971954278122e-01 8.7987852225658303e-01 7.6834295200565705e-01 6.2087530894804055e-01 7.9523156025077957e-01 8.3189592572391668e-02 7.4527204071029118e-01 1.7168914014464565e-01 6.4024339383210793e-01 4.7051120988032114e-01 7.3991134708839257e-01 6.9727632429789299e-01 7.9901163482237803e-01 9.7786053731897582e-01 6.4020663985588955e-01 6.1299751870622943e-01 2.0769354912309579e-01 8.4212549598643649e-01 2.6494012680566281e-01 2.6923822357603600e-02 1.6360315270545678e-01 5.5026885098899259e-01 4.3926305010117850e-02 2.3709963300152437e-01 3.0286948911313338e-03 7.8774144114460520e-01 7.7669296695025258e-01 4.2969450904609452e-01 3.7597209698334411e-01 4.4524513343272121e-02 6.0167559639795587e-02 1.0578433110097485e-01 4.8392347456417129e-01 7.8019304296682912e-02 9.4166940478339789e-01 1.7681457887673979e-01 8.6762820992417611e-02 8.7495394112995439e-01 1.3413795755485414e-01 3.8441577935736448e-01 3.7470793006034464e-01 5.0775182098339389e-01 4.7524575666372515e-01 1.7981150219493136e-01 6.7370366631287792e-01