Facebook
From fafaegge, 6 Years ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 239
  1. close all
  2. clear
  3. matrixI=[
  4.     0 0 1 1 0 0
  5.     0 0 1 1 0 0
  6.     0 0 1 1 0 0
  7.     0 0 1 1 0 0
  8.     0 0 1 1 0 0
  9.     0 0 1 1 0 0
  10.     0 0 1 1 0 0
  11.     0 0 1 1 0 0
  12.     ]
  13. matrixJ=[
  14.     1 1 1 1 1 1
  15.     1 1 1 1 1 1
  16.     0 0 0 0 1 1
  17.     0 0 0 0 1 1
  18.     0 0 0 0 1 1
  19.     0 0 0 0 1 1
  20.     1 1 0 0 1 1
  21.     0 0 1 1 0 0
  22.     ]
  23. matrixK=[
  24.     1 1 0 0 1 1
  25.     1 1 0 0 1 0
  26.     1 1 0 1 0 0
  27.     1 1 1 0 0 0
  28.     1 1 1 0 0 0
  29.     1 1 1 1 0 0
  30.     1 1 0 1 1 0
  31.     1 1 0 0 1 1
  32.     ]
  33. matrixL=[
  34.     1 1 0 0 0 0
  35.     1 1 0 0 0 0
  36.     1 1 0 0 0 0
  37.     1 1 0 0 0 0
  38.     1 1 0 0 0 0
  39.     1 1 0 0 0 0
  40.     1 1 1 1 1 1
  41.     1 1 1 1 1 1
  42.     ]
  43. whos
  44. disp(matrixI)
  45. disp(matrixJ)
  46. disp(matrixK)
  47. disp(matrixL)
  48.  
  49. figure(1)
  50. hintonw(matrixI)
  51.  
  52. figure(2)
  53. hintonw(matrixJ)
  54.  
  55. figure(3)
  56. hintonw(matrixK)
  57.  
  58. figure(4)
  59. hintonw(matrixL)
  60.  
  61. P = [reshape(matrixI,48,1),reshape(matrixJ,48,1),reshape(matrixK,48,1),reshape(matrixL,48,1)]
  62. T = [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1]