Hmmm, description is a little confusing. Is length(x) always = length(y)? Are they nx1 or 1xn? Anyhow, I submitted several possible solutions (e.g. z = x'*y, z = sum(x.*y)) all of which failed the test suite ... but they work fine on my machine!
Note that the output variable in the pattern is y, not z.
ha, yeah. thanks for commenting about that. I didn't see it either.
Find the treasures in MATLAB Central and discover how the community can help you!
Select a Web
Choose a web site to get translated content where available and see local events and
offers. Based on
your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country
sites are not optimized for visits from your location.
Contact your local office