in cody coursework i keep getting the response "Assertion failed." when i go to test the question. What am i doing wrong?
Show older comments
product of y and z such that the result is a 40x5 matrix?
y=linspace(2.5,10,5)'
z=ones(1,40)
z(1,1:40)=pi
y*z= 5x40 matrix=M
When I try to use the inverse x=M.'or x=z'*y' for the answer and when i go to test it i get the error:
assert(isequal(ref_output,student_output));
Assertion failed.
How do I get the correct solution?
1 Comment
Nicholas Ayres
on 13 Jun 2017
You seem to be testing whether the two matrices are exactly the same, including all the values within the matrix. This may be your issue? Also, make sure all your variables are correctly defined. size(<your_variable>) will be the useful function.
Accepted Answer
More Answers (1)
Sally Al Khamees
on 2 Feb 2017
Edited: Sally Al Khamees
on 3 Feb 2017
0 votes
You cannot view any other answer beside your own on Cody Coursework. It is designed to emulate a homework assignment. You can contact the professor who has created the course to get the solution. Hope this helps
Categories
Find more on Code Performance in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!