Code covered by the BSD License  

Highlights from
swapping

1.0

1.0 | 1 rating Rate this file 4 Downloads (last 30 days) File Size: 1020 Bytes File ID: #32805

swapping

by sumit verma

 

07 Sep 2011

swapping of two numbers in matlab

| Watch this File

File Information
Description

program showing how to swap two numbers in matlab

MATLAB release MATLAB 7.8 (R2009a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
08 Sep 2011 James Tursa

This is an un-commented script rather than a function. This does "cute" numerical operations to do the swap, but the method suffers from cancellation error and completely breaks down if the values are too widely separated (e.g., 1e20 and 1). In short, this is useless code and should be removed from the FEX.

Please login to add a comment or rating.
Tag Activity for this File
Tag Applied By Date/Time
swapping sumit verma 07 Sep 2011 10:43:21
mathematics sumit verma 07 Sep 2011 10:43:21

Contact us at files@mathworks.com