Cody

# Problem 3030. Find out rooms, peak to peak, average for a square wave.

Solution 1158943

Submitted on 10 Apr 2017
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   Fail
p= 1; y_correct = [1]; assert(isequal( seq_wave(p),y_correct))

Error: File: seq_wave.m Line: 1 Column: 1 The variable p was mentioned more than once as an output. Error in TestPoint1 (line 3) assert(isequal( seq_wave(p),y_correct))

2   Fail
p= 1; y_correct = [2]; [~,~, a]=seq_wave(p) assert(isequal(a ,y_correct))

Error: File: seq_wave.m Line: 1 Column: 1 The variable p was mentioned more than once as an output. Error in TestPoint2 (line 3) [~,~, a]=seq_wave(p)

3   Fail
p= 8.25; [a,b,c]=seq_wave(p); assert(isequal(a ,8.25)) assert(isequal(b ,8.25)) assert(isequal(c ,16.5))

Error: File: seq_wave.m Line: 1 Column: 1 The variable p was mentioned more than once as an output. Error in TestPoint3 (line 2) [a,b,c]=seq_wave(p);

4   Fail
p= 3.5; [a,b,c]=seq_wave(p); assert(isequal(a ,3.5)) assert(isequal(b ,3.5)) assert(isequal(c ,7))

Error: File: seq_wave.m Line: 1 Column: 1 The variable p was mentioned more than once as an output. Error in TestPoint4 (line 2) [a,b,c]=seq_wave(p);