Cody

Problem 262. Swap the input arguments

Created by Steve Eddins in Community

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.

Solution Stats

51.44% Correct | 48.56% Incorrect
Last solution submitted on May 23, 2018

Problem Comments

Solution Comments

Recent Solvers1474

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

MATLAB Academy

New to MATLAB?

Learn MATLAB today!