Cody

Problem 543. deconvolution

Solution 819563

Submitted on 3 Feb 2016 by Zikobrelli
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
%% v=[1 0 0 -1]; w=[1 -1]; assert(integ(v,w))

y = 0 y = 0 y = 0 y = 1 y = 1

2   Pass
%% v=[2 9 6 -1 16 -5]; w=[2 3 -1 5]; assert(integ(v,w))

y = 0 y = 0 y = 0 y = 0 y = 1 y = 1 y = 1 y = 1 y = 2 y = 2 y = 2 y = 2 y = 3 y = 3 y = 3 y = 3 y = 1

3   Pass
%% v=[1 4 10 20 35 50 58 58 49 30]; w=1:6; assert(integ(v,w))

y = 0 y = 1 y = 1 y = 1 y = 1 y = 1 y = 1 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 2 y = 3 y = 3 y = 3 y = 3 y = 3 y = 3 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 4 y = 5 y = 5 y = 5 y = 1

4   Pass
%% v=1:10; w=1:6; assert(~integ(v,w))

y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0

5   Pass
%% v=3:12; w=-3:2; assert(~integ(v,w))

y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0 y = 0