Problem 44950. Calculate Inner Product
- If they match, create an output variable z which contains the product of x and y
- Otherwise, z should contain a custom string message
Solution Stats
Problem Comments
-
11 Comments
DO NOT use disp when printing the string for z, just use z = "string message". Otherwise even if your code is correct it will not complete the problem.
Why adding z=[]; after z="Have you....?" is failing in Test case?
This is grossly misleading for aspiring linear algebra students. The product calculated in this example is called a "matrix multiplication product", not a "inner product". The "inner product" is a generalization of the dot product.
Solution Comments
Show commentsProblem Recent Solvers7500
Suggested Problems
-
2633 Solvers
-
Remove the polynomials that have positive real elements of their roots.
1703 Solvers
-
Project Euler: Problem 5, Smallest multiple
1503 Solvers
-
Create an n-by-n null matrix and fill with ones certain positions
631 Solvers
-
4683 Solvers
More from this Author13
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!