Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 193713

Submitted on 19 Jan 2013 by Alfonso Nieto-Castanon

Correct

17Size
Leading solution size is 17.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
close all
hIn = line;
hOut = line;
assert(isequal(siblings(hIn),hOut))

                    
2
Pass
 
%%
close all
hIn = patch;
hOut = line;
assert(isequal(siblings(hIn),hOut))

                    
3
Pass
 
%%
close all
hIn = line;
hOut = sort([line; line]);
assert(isequal(siblings(hIn),hOut))

                    
4
Pass
 
%%
close all
hIn = subplot(1,2,1);
hOut = subplot(1,2,2);
assert(isequal(siblings(hIn),hOut))

                    
5
Pass
 
%%
close all
hIn = figure;
hOut = figure;
assert(isequal(siblings(hIn),hOut))

                    
6
Pass
 
%%
close all
hIn = line;
hOut = [];
assert(isequal(siblings(hIn),hOut))

                    
7
Pass
 
%%
close all
hIn = 0;
hOut = [];
assert(isequal(siblings(hIn),hOut))