⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 turbo_logmap.txt

📁 turbo码的matlab仿真源程序
💻 TXT
📖 第 1 页 / 共 4 页
字号:
Error in ==> d:\MATLAB6p1\work\demo_turbo\logmapo.m
On line 70  ==>      gamma(next_state(state1,2)) = (rec_s(2*k+1)+rec_s(2*k+2)*next_out(state1,4))....

Error in ==> d:\MATLAB6p1\work\demo_turbo\turbo_sys_demo.m
On line 145  ==>             L_all = logmapo(rec_s(2,:), g, L_a, 2);  % complete info.  

g = [ 1 1 1;
         1 0 1 ];
g

g =

     1     1     1
     1     0     1

size(g)

ans =

     2     3

help sort

 SORT   Sort in ascending order.
    For vectors, SORT(X) sorts the elements of X in ascending order.
    For matrices, SORT(X) sorts each column of X in ascending order.
    For N-D arrays, SORT(X) sorts the along the first non-singleton
    dimension of X. When X is a cell array of strings, SORT(X) sorts
    the strings in ASCII dictionary order.
 
    SORT(X,DIM) sorts along the dimension DIM.
 
    [Y,I] = SORT(X) also returns an index matrix I. If X is a
    vector, then Y = X(I).  If X is an m-by-n matrix, then
        for j = 1:n, Y(:,j) = X(I(:,j),j); end
 
    When X is complex, the elements are sorted by ABS(X).  Complex
    matches are further sorted by ANGLE(X).
 
    When more than one element has the same value, the order of the
    elements are preserved in the sorted result and the indexes of
    equal elements will be ascending in any index matrix.
 
    Example: If X = [3 7 5
                     0 4 2]
 
    then sort(X,1) is [0 4 2  and sort(X,2) is [3 5 7
                       3 7 5]                   0 2 4];
 
    See also SORTROWS, MIN, MAX, MEAN, MEDIAN.

 Overloaded methods
    help cell/sort.m

dbstop 'd:\MATLAB6p1\work\demo_turbo\turbo_sys_demo.m' 117
turbo_sys_demo
 Please enter the decoding algorithm. (0:Log-MAP, 1:SOVA)  default 0    
 Please enter the frame size (= info + tail, default: 400)   
 Please enter code generator: ( default: g = [1 1 1; 1 0 1 ] )      
 Please choose punctured / unpunctured (0/1): default 0     
 Please enter number of iterations for each frame: default 5       
 Please enter number of frame errors to terminate: default 15        
 Please enter Eb/N0 in dB : default [2.0]    


----------------------------------------------------
 === Log-MAP decoder === 
 Frame size =    400
 code generator: 
     1     1     1
     1     0     1
 Punctured, code rate = 1/2 
 iteration number =       5
 terminate frame errors =     15
 Eb / N0 (dB) =       2.00
----------------------------------------------------

+ + + + Please be patient. Wait a while to get the result. + + + +
dbstep
dbstep
dbstep
dbstep
sort(rand(1,L_total))

ans =

  Columns 1 through 7 

    0.0027    0.0045    0.0078    0.0092    0.0096    0.0124    0.0136

  Columns 8 through 14 

    0.0176    0.0255    0.0292    0.0332    0.0359    0.0390    0.0413

  Columns 15 through 21 

    0.0421    0.0438    0.0444    0.0459    0.0475    0.0478    0.0483

  Columns 22 through 28 

    0.0489    0.0492    0.0498    0.0551    0.0569    0.0616    0.0633

  Columns 29 through 35 

    0.0660    0.0665    0.0756    0.0773    0.0792    0.0792    0.0833

  Columns 36 through 42 

    0.0837    0.0853    0.0877    0.0898    0.0900    0.0920    0.0943

  Columns 43 through 49 

    0.0945    0.0977    0.1051    0.1170    0.1178    0.1202    0.1236

  Columns 50 through 56 

    0.1238    0.1252    0.1320    0.1349    0.1410    0.1420    0.1435

  Columns 57 through 63 

    0.1477    0.1479    0.1483    0.1516    0.1530    0.1567    0.1572

  Columns 64 through 70 

    0.1597    0.1603    0.1616    0.1629    0.1651    0.1657    0.1675

  Columns 71 through 77 

    0.1699    0.1714    0.1728    0.1799    0.1810    0.1841    0.1868

  Columns 78 through 84 

    0.1871    0.1873    0.1877    0.1889    0.1903    0.1910    0.1910

  Columns 85 through 91 

    0.1924    0.1993    0.2015    0.2032    0.2077    0.2114    0.2139

  Columns 92 through 98 

    0.2148    0.2153    0.2157    0.2187    0.2207    0.2215    0.2262

  Columns 99 through 105 

    0.2282    0.2317    0.2335    0.2340    0.2353    0.2421    0.2475

  Columns 106 through 112 

    0.2485    0.2486    0.2498    0.2524    0.2555    0.2563    0.2590

  Columns 113 through 119 

    0.2648    0.2653    0.2665    0.2690    0.2791    0.2854    0.2873

  Columns 120 through 126 

    0.2877    0.2886    0.2890    0.2902    0.2912    0.2965    0.2972

  Columns 127 through 133 

    0.2983    0.3032    0.3052    0.3093    0.3098    0.3105    0.3128

  Columns 134 through 140 

    0.3138    0.3146    0.3154    0.3158    0.3182    0.3186    0.3196

  Columns 141 through 147 

    0.3213    0.3214    0.3243    0.3271    0.3306    0.3349    0.3356

  Columns 148 through 154 

    0.3367    0.3389    0.3450    0.3462    0.3486    0.3495    0.3497

  Columns 155 through 161 

    0.3519    0.3522    0.3552    0.3608    0.3649    0.3661    0.3690

  Columns 162 through 168 

    0.3719    0.3742    0.3764    0.3776    0.3869    0.3873    0.3888

  Columns 169 through 175 

    0.3918    0.3934    0.3965    0.3977    0.3987    0.3988    0.4003

  Columns 176 through 182 

    0.4045    0.4057    0.4058    0.4065    0.4145    0.4173    0.4236

  Columns 183 through 189 

    0.4244    0.4273    0.4331    0.4357    0.4376    0.4398    0.4427

  Columns 190 through 196 

    0.4439    0.4457    0.4474    0.4477    0.4501    0.4548    0.4554

  Columns 197 through 203 

    0.4608    0.4610    0.4669    0.4685    0.4722    0.4746    0.4753

  Columns 204 through 210 

    0.4805    0.4889    0.4923    0.5029    0.5067    0.5103    0.5118

  Columns 211 through 217 

    0.5120    0.5128    0.5143    0.5147    0.5155    0.5168    0.5178

  Columns 218 through 224 

    0.5201    0.5235    0.5237    0.5240    0.5245    0.5334    0.5397

  Columns 225 through 231 

    0.5443    0.5507    0.5544    0.5556    0.5621    0.5667    0.5700

  Columns 232 through 238 

    0.5718    0.5734    0.5742    0.5744    0.5800    0.5802    0.5833

  Columns 239 through 245 

    0.5841    0.5857    0.5895    0.5905    0.5909    0.5920    0.5955

  Columns 246 through 252 

    0.5994    0.6008    0.6059    0.6093    0.6099    0.6138    0.6216

  Columns 253 through 259 

    0.6231    0.6234    0.6256    0.6394    0.6430    0.6456    0.6457

  Columns 260 through 266 

    0.6461    0.6463    0.6477    0.6495    0.6503    0.6569    0.6587

  Columns 267 through 273 

    0.6610    0.6623    0.6646    0.6649    0.6661    0.6681    0.6715

  Columns 274 through 280 

    0.6736    0.6756    0.6769    0.6872    0.6901    0.6904    0.6944

  Columns 281 through 287 

    0.6975    0.6975    0.7043    0.7085    0.7106    0.7191    0.7213

  Columns 288 through 294 

    0.7228    0.7242    0.7245    0.7252    0.7273    0.7292    0.7300

  Columns 295 through 301 

    0.7326    0.7388    0.7391    0.7479    0.7498    0.7548    0.7588

  Columns 302 through 308 

    0.7601    0.7609    0.7664    0.7666    0.7669    0.7689    0.7712

  Columns 309 through 315 

    0.7772    0.7780    0.7784    0.7835    0.7846    0.7863    0.7954

  Columns 316 through 322 

    0.7974    0.8014    0.8041    0.8114    0.8192    0.8205    0.8210

  Columns 323 through 329 

    0.8250    0.8265    0.8275    0.8284    0.8317    0.8332    0.8359

  Columns 330 through 336 

    0.8376    0.8435    0.8471    0.8485    0.8547    0.8560    0.8583

  Columns 337 through 343 

    0.8598    0.8645    0.8650    0.8654    0.8663    0.8726    0.8728

  Columns 344 through 350 

    0.8734    0.8773    0.8791    0.8792    0.8793    0.8809    0.8821

  Columns 351 through 357 

    0.8826    0.8828    0.8843    0.8882    0.8896    0.8896    0.8910

  Columns 358 through 364 

    0.8913    0.8932    0.8944    0.8978    0.8991    0.8998    0.9030

  Columns 365 through 371 

    0.9123    0.9171    0.9203    0.9236    0.9256    0.9292    0.9294

  Columns 372 through 378 

    0.9300    0.9339    0.9361    0.9371    0.9379    0.9382    0.9419

  Columns 379 through 385 

    0.9428    0.9446    0.9557    0.9578    0.9580    0.9612    0.9614

  Columns 386 through 392 

    0.9659    0.9679    0.9696    0.9699    0.9700    0.9704    0.9768

  Columns 393 through 399 

    0.9776    0.9808    0.9867    0.9897    0.9903    0.9948    0.9963

  Column 400 

    0.9970

alpha

alpha =

  Columns 1 through 13 

   288   102   211   136    92   208   369   113   167   146   108   220    64

  Columns 14 through 26 

   359   135   316   356   375   149   380   376   218   191   255   181   286

  Columns 27 through 39 

   200   162   123   197   166    25   139   336   133   204   330    57   360

  Columns 40 through 52 

   196   323    37   144    33   299   206    43   256   183   116   278   328

  Columns 53 through 65 

    56   186    50   175   254   233   245   240   337   239   383    66    87

  Columns 66 through 78 

   143    73   209    68    23   298   252    91    13   152   350   371    20

  Columns 79 through 91 

   354    82   150     1   284    84    11   372   169   326    52   268   207

  Columns 92 through 104 

   314   142   138   154   365    40   137   333    67   396   368   236   315

  Columns 105 through 117 

   265   257   389   353   232   104   237   173    28   349   303   259   384

  Columns 118 through 130 

   184   238   250   156    32   394   338   171   339   273    86   202   229

  Columns 131 through 143 

   340   319   100   199   346   293   148   310   168    30   122   178   306

  Columns 144 through 156 

   318    51   115    89    76   246   308   188    93   367   125   285   203

  Columns 157 through 169 

   118   124    79   262    24    14    22   180   157   131   289   224   364

  Columns 170 through 182 

    29   305   160    59    72   361   292    38   221   147    62   281    85

  Columns 183 through 195 

    45   362   378    19   269    44   161   130   249   226   348   385   312

  Columns 196 through 208 

     8   363   189    53   231     3   109   391   129   351    49   358    55

  Columns 209 through 221 

   399   110    70   111   117   398   390    65   260    10   128    27   388

  Columns 222 through 234 

   187    54    96   279   374   228   174   205    75   261   230   248   145

  Columns 235 through 247 

    12   395   301   190   270   355    80   258   357   170    47   223   212

  Columns 248 through 260 

   373    61    31   155   282   324    99   127    83   247   120   280    35

  Columns 261 through 273 

   214     7   370   153   352    58   159   272   185   294   134   194     9

  Columns 274 through 286 

   313   331   172     4   271   132   274   263   317   322   176   386   177

  Columns 287 through 299 

   302   276   387   327   244   182   329    74   321   400   251   377   201

  Columns 300 through 312 

    36   121   225    46   341   243    15    94    34   307   192   106   344

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -