Problem 48055. Find the Pattern 8
Find the pattern for the following sequence:
pat(1) = 2
pat(2) = 8
pat(3) = 18
pat(5) = 0.0667
pat(15) = 0.0222
Create a function which satisfies the pattern shown above.
Solution Stats
Problem Comments
-
4 Comments
Show
1 older comment
Md. Nayem Uddin Biswas
on 14 Nov 2022
Correct your test case 3 and 4. I've the same results, but still they show me "assertion failed".
Dyuman Joshi
on 14 Nov 2022
@Md. Nayem, the test cases are in fact correct and your solution is incorrect, that is why it is showing "assertion failed".
Md. Nayem Uddin Biswas
on 16 Nov 2022
@Dyuman, do you remember that the test cases can be seen clicking on them? I clicked on the test cases and matched their results with mine.
I think this is the probable reason mentioned in the following link.
https://www.mathworks.com/matlabcentral/answers/322448-in-cody-coursework-i-keep-getting-the-response-assertion-failed-when-i-go-to-test-the-question-w
Solution Comments
Show commentsProblem Recent Solvers155
Suggested Problems
-
692 Solvers
-
Fahrenheit to Celsius converter
565 Solvers
-
391 Solvers
-
162 Solvers
-
985 Solvers
More from this Author180
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!