This solution is outdated. To rescore this solution, sign in.
-
1 Comment
Umur Ulas Harman
on 29 Jun 2020
function z = in_prod(x,y)
if size(x,2)==size(y,1)
z=x*y
else
z = "The inner dimensions are " + size(x,2) + " and " + size(y,1) + ". Matrix multiplication is not possible";
end
end
Suggested Problems
-
Extract leading non-zero digit
2175 Solvers
-
Read a column of numbers and interpolate missing data
2315 Solvers
-
2482 Solvers
-
1317 Solvers
-
Pernicious Anniversary Problem
823 Solvers
More from this Author13
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!