Advertisement
Guest User

Untitled

a guest
May 21st, 2019
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scilab 0.48 KB | None | 0 0
  1. u=[1;5;6;7]
  2. v=[8 6 5]
  3. A=[1 2 3; 4 5 6; 7 8 9]
  4. B=[1 4 7 10; 2 5 8 11; 3 6 9 12]
  5. [nLu nCu] = size(u)
  6. [nLv nCv] = size(v')
  7. [nLA nCA] = size(A')
  8. [nLB nCB] = size(B)
  9. if nCv==nLA then
  10.     x = v'*A'
  11.     if nCB==nLu then
  12.         y = B*u
  13.         [nLx nCx] = size(x)
  14.         [nLy nCy] = size(y)
  15.         if nCx==nLy then
  16.             disp("coerente", x*y)
  17.         else
  18.             disp("incoerente 3")
  19.         end
  20.     else
  21.         disp("incoerente 2")
  22.     end
  23. else
  24.     disp("incoerente 1")
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement