Cody

# Problem 464. Function Sniffer

Solution 65428

Submitted on 24 Mar 2012 by Freddy
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 = 'x=cos(theta); y=sin(beta);' y_correct = 'cos sin'; assert(isequal(sniffing(x),y_correct))

x = x=cos(theta); y=sin(beta); b = 'x' 'cos' 'theta' 'y' 'sin' 'beta' c = 'cos' 'sin' r = cos sin

2   Pass
%% x = 'x=sum(1:100); y=sqrt(x);' y_correct = 'sqrt sum'; assert(isequal(sniffing(x),y_correct))

x = x=sum(1:100); y=sqrt(x); b = 'x' 'sum' '1' '100' 'y' 'sqrt' 'x' c = 'sqrt' 'sum' r = sqrt sum

3   Pass
%% x = 'x=ones(round(7.7))-rand;' y_correct = 'ones rand round'; assert(isequal(sniffing(x),y_correct))

x = x=ones(round(7.7))-rand; b = 'x' 'ones' 'round' '7' '7' 'rand' c = 'ones' 'rand' 'round' r = ones rand round

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!