Replace all elements in a vector which are equal to or smaller than zero with 0.1.
A = [1 2 3 -1 0 2 -3 -80];
B = [1 2 3 0.1 0.1 2 0.1 0.1];
Please add more tests, because it is easy to cheat :)
ambiguous about what happens to numbers between [0,0.1] : ill-defined problem or poor-testsuite
The solution passes all tests but it is not correct.
this solution is false!
correct is .01
this function compute .1
??? What is this man???
He probably noticed that you had already set x to the correct answer in your test suite. All he (or anybody else) has to do is pass it back to you. Try removing the FOR loop from your test (and add some more tests while you're in there!).
Back to basics 6 - Column Vector
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Who has power to do everything in this world?
Area of rhombus
What is Sum Of all elements of Matrix
Find number of days
arrangement of symbols
Are all the three given point in the same line?
Given a number find two variables
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