Advertisement
Guest User

Untitled

a guest
Nov 19th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MatLab 4.54 KB | None | 0 0
  1. >> A = [1 1 0 0.5 ; 1 0 -1 0.5 ; 0 50 0 15 ; 0 0 40 15]
  2.  
  3. A =
  4.  
  5.     1.0000    1.0000         0    0.5000
  6.     1.0000         0   -1.0000    0.5000
  7.          0   50.0000         0   15.0000
  8.          0         0   40.0000   15.0000
  9.  
  10. >> B = [-1 -1 0 0.5 ; 1 0 -1 0.5 ; 0 50 0 15 ; 0 0 40 15]
  11.  
  12. B =
  13.  
  14.    -1.0000   -1.0000         0    0.5000
  15.     1.0000         0   -1.0000    0.5000
  16.          0   50.0000         0   15.0000
  17.          0         0   40.0000   15.0000
  18.  
  19. >> C = transpose([0,0,60,60])
  20.  
  21. C =
  22.  
  23.      0
  24.      0
  25.     60
  26.     60
  27.  
  28. >> x1 = A ^ -1 * C
  29.  
  30. x1 =
  31.  
  32.     -2
  33.      0
  34.      0
  35.      4
  36.  
  37. >> X2 = B ^ -1 * C
  38.  
  39. X2 =
  40.  
  41.     0.0896
  42.     0.7164
  43.     0.8955
  44.     1.6119
  45.  
  46. >> 0.0896 .* 15
  47.  
  48. ans =
  49.  
  50.     1.3440
  51.  
  52. >> 1.6119 .* 15
  53.  
  54. ans =
  55.  
  56.    24.1785
  57.  
  58. >> 0.8955 .* 40
  59.  
  60. ans =
  61.  
  62.    35.8200
  63.  
  64. >> 0.7164 .* 50
  65.  
  66. ans =
  67.  
  68.    35.8200
  69.  
  70. >> 35.8200 .* 0.8955
  71.  
  72. ans =
  73.  
  74.    32.0768
  75.  
  76. >> 35.8200 .* 0.764
  77.  
  78. ans =
  79.  
  80.    27.3665
  81.  
  82. >> 0.896 .* 0.0896
  83.  
  84. ans =
  85.  
  86.     0.0803
  87.  
  88. >> 1.6119 .* 15
  89.  
  90. ans =
  91.  
  92.    24.1785
  93.  
  94. >> 24.1785 .* 1.6119
  95.  
  96. ans =
  97.  
  98.    38.9733
  99.  
  100. >> X8 = [1 -1 0 0 0 0 0 0 ; 0 1 -1 -1 0 0 0 0 ; 1 0 0 0 0 0 0 0 1 ; 0 0 0 0 1 0 -1 1 ; 0 0 0 1 -1 -1 0 0; -4 0 0 0 5 -5 20 0 ; -10 0 0 -5 -5 0 0 0 ; 4 0 -15 5 0 5 0 0]
  101. Dimensions of arrays being concatenated are not consistent.
  102.  
  103. >> X8 = [1 -1 0 0 0 0 0 0 ; 0 1 -1 -1 0 0 0 0 ; 1 0 0 0 0 0 0 1 ; 0 0 0 0 1 0 -1 1 ; 0 0 0 1 -1 -1 0 0; -4 0 0 0 5 -5 20 0 ; -10 0 0 -5 -5 0 0 0 ; 4 0 -15 5 0 5 0 0]
  104.  
  105. X8 =
  106.  
  107.      1    -1     0     0     0     0     0     0
  108.      0     1    -1    -1     0     0     0     0
  109.      1     0     0     0     0     0     0     1
  110.      0     0     0     0     1     0    -1     1
  111.      0     0     0     1    -1    -1     0     0
  112.     -4     0     0     0     5    -5    20     0
  113.    -10     0     0    -5    -5     0     0     0
  114.      4     0   -15     5     0     5     0     0
  115.  
  116. >> Y8 = transpose([-3 0 -3 0 0 -15 -10 0])
  117.  
  118. Y8 =
  119.  
  120.     -3
  121.      0
  122.     -3
  123.      0
  124.      0
  125.    -15
  126.    -10
  127.      0
  128.  
  129. >> z8 = X8 ^ -1 * Y8
  130.  
  131. z8 =
  132.  
  133.    -0.5773
  134.     2.4227
  135.     0.6086
  136.     1.8141
  137.     1.3405
  138.     0.4736
  139.    -1.0822
  140.    -2.4227
  141.  
  142. >> 15 + 20 .* -2.42
  143.  
  144. ans =
  145.  
  146.   -33.4000
  147.  
  148. >> 4 .* -0.58 + 5 .* -1.08
  149.  
  150. ans =
  151.  
  152.    -7.7200
  153.  
  154. >> -10 + 15 .* 1.81
  155.  
  156. ans =
  157.  
  158.    17.1500
  159.  
  160. >> function = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)));
  161.  function = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)));
  162.  ↑
  163. Error: Function definition not supported in this context. Create functions in code
  164. file.
  165.  
  166. >> function = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)))
  167.  function = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)))
  168.  ↑
  169. Error: Function definition not supported in this context. Create functions in code
  170. file.
  171.  
  172. >> function_shittot33 = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)));
  173. >> integral (function_shittot33 , 1i , 1 ,"Waypoints",1+1i)
  174.  
  175. ans =
  176.  
  177.   -0.7103 + 3.0191i
  178.  
  179. >> fun2 = @(al) cos(al) + 1i * sin(al);
  180. >> fun22 = @(al) -sin(al) + 1i * cos(al);
  181. >> integral ( @(k) function_shittot33(fun2(t)) .* fun22(t) , 0.5 * pi , 0)
  182. Undefined function or variable 't'.
  183.  
  184. Error in @(k)function_shittot33(fun2(t)).*fun22(t)
  185.  
  186. Error in integralCalc/iterateScalarValued (line 314)
  187.                 fx = FUN(t);
  188.  
  189. Error in integralCalc/vadapt (line 132)
  190.             [q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
  191.  
  192. Error in integralCalc (line 75)
  193.         [q,errbnd] = vadapt(@AtoBInvTransform,interval);
  194.  
  195. Error in integral (line 88)
  196. Q = integralCalc(fun,a,b,opstruct);
  197.  
  198. >> function_shittot33 = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)));
  199. >> integral (function_shittot33 , 1i , 1 ,"Waypoints",1+1i)
  200.  
  201. ans =
  202.  
  203.   -0.7103 + 3.0191i
  204.  
  205. >> fun2 = @(al) cos(al) + 1i * sin(al);
  206. >> fun22 = @(al) -sin(al) + 1i * cos(al);
  207. >> integral ( @(k) function_shittot33(fun2(t)) .* fun22(t) , 0.5 * pi , 0)
  208. Undefined function or variable 't'.
  209.  
  210. Error in @(k)function_shittot33(fun2(t)).*fun22(t)
  211.  
  212. Error in integralCalc/iterateScalarValued (line 314)
  213.                 fx = FUN(t);
  214.  
  215. Error in integralCalc/vadapt (line 132)
  216.             [q,errbnd] = iterateScalarValued(u,tinterval,pathlen);
  217.  
  218. Error in integralCalc (line 75)
  219.         [q,errbnd] = vadapt(@AtoBInvTransform,interval);
  220.  
  221. Error in integral (line 88)
  222. Q = integralCalc(fun,a,b,opstruct);
  223.  
  224. >> function_shittot33 = @(z) log(1./ conj(z)) .* exp (sqrt (sin(z)));
  225. >> integral (function_shittot33 , 1i , 1 ,"Waypoints",1+1i)
  226.  
  227. ans =
  228.  
  229.   -0.7103 + 3.0191i
  230.  
  231. >> fun2 = @(al) cos(al) + 1i * sin(al);
  232. >> fun22 = @(al) -sin(al) + 1i * cos(al);
  233. >> integral ( @(k) function_shittot33(fun2(k)) .* fun22(k) , 0.5 * pi , 0)
  234.  
  235. ans =
  236.  
  237.    0.1667 + 2.5673i
  238.  
  239. >>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement