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

Problem 262. Swap the input arguments

Created by Steve Eddins

Write a two-input, two-output function that swaps its two input arguments. For example:

   [q,r] = swap(5,10)

returns q = 10 and r = 5.

Tags

Problem Group

Solution Statistics

966 correct solutions 668 incorrect solutions
Last solution submitted on Nov 23, 2014

Problem Comments