Cody

Solution 1244498

Submitted on 2 Aug 2017 by Chris Cleveland
  • Size: 14
  • This is the leading solution.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x=0:0.01:1; y=@(x)x.^2 z_correct = 0.3334 assert(abs(integralx2(x,y)-z_correct)<0.001)

y = function_handle with value: @(x)x.^2 z_correct = 0.3334

2   Pass
x=0:0.01:1; y=@(x)x.^3 z_correct = 0.25 assert(abs(integralx2(x,y)-z_correct)<0.001)

y = function_handle with value: @(x)x.^3 z_correct = 0.2500

Suggested Problems

More from this Author27