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 Solvers7505
Suggested Problems
-
Determine whether a vector is monotonically increasing
21334 Solvers
-
Project Euler: Problem 4, Palindromic numbers
1147 Solvers
-
Are all the three given point in the same line?
584 Solvers
-
Sum of odd numbers in a matrix
588 Solvers
-
1285 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!