Code covered by the BSD License  

Highlights from
moneysplit

Be the first to rate this file! 1 Download (last 30 days) File Size: 1.61 KB File ID: #24312

moneysplit

by John T. McCarthy

 

30 May 2009 (Updated 02 Jun 2009)

Divide a sum of money in a certain ratio, making sure that the amounts add up exactly to the total.

| Watch this File

File Information
Description

EXAMPLE: y = moneysplit(3679.02,[100 100 200])
---> [919.75 919.76 1839.51]

PURPOSE: When sums of money are divided, and when the dividend amounts have been rounded to the nearest cent, they may not add up exactly to the total. It is then necessary to look at further decimal places, in order to find 'the best candidates' to change.

This function performs the task, and makes sure that the smaller amounts add up exactly to the total. This is no 'rocket science' program, but it can be of help in filling in expense accounts, and also in the subdivision of share-lots for a tax return.

MATLAB release MATLAB 7.2 (R2006a)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Please login to add a comment or rating.
Updates
02 Jun 2009

revised tags

Tag Activity for this File
Tag Applied By Date/Time
accountancy John T. McCarthy 03 Jun 2009 09:21:58
finance John T. McCarthy 03 Jun 2009 09:21:59
financial John T. McCarthy 03 Jun 2009 09:21:59
stocks John T. McCarthy 03 Jun 2009 09:21:59
money John T. McCarthy 03 Jun 2009 09:21:59
general John T. McCarthy 03 Jun 2009 09:21:59
tax John T. McCarthy 04 Jun 2009 06:00:15

Contact us at files@mathworks.com