Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- u=[1;5;6;7]
- v=[8 6 5]
- A=[1 2 3; 4 5 6; 7 8 9]
- B=[1 4 7 10; 2 5 8 11; 3 6 9 12]
- [nLu nCu] = size(u)
- [nLv nCv] = size(v')
- [nLA nCA] = size(A')
- [nLB nCB] = size(B)
- if nCv==nLA then
- x = v'*A'
- if nCB==nLu then
- y = B*u
- [nLx nCx] = size(x)
- [nLy nCy] = size(y)
- if nCx==nLy then
- disp("coerente", x*y)
- else
- disp("incoerente 3")
- end
- else
- disp("incoerente 2")
- end
- else
- disp("incoerente 1")
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement