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

New to MATLAB?

Problem 175. Double Deal

Created by @bmtran


Given an input vector v, return the first element as the first output, the second element as the second output, etc. The functionality of this problem is the double array analog to the deal function in MATLAB for cell arrays.



    x = 1:10;
    [a,b,c,d] = doubleDeal(x);


    a = 1
    b = 2
    c = 3
    d = 4


Problem Group

Solution Statistics

74 correct solutions 118 incorrect solutions
Last solution submitted on Sep 28, 2015