Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a MATLAB script to perform the following. You have three arrays of different length. In array A there is a long list of

1. Write a MATLAB script to perform the following.

You have three arrays of different length. In array A there is a long list of account numbers and

balances. In array B there are a list of account numbers and credits. In array C there is a list of account

numbers and debits.

For example, these arrays might look like this:

a=

132435 100
132590 345.76
123873 34.1
123798 14590.02
738274 234.89
631076 723.88
983041 724
871347 909.88
b=
123873 34.1
123798 16.76
983041 74.45
871347 90.84
c=
132435 10
132590 35.76
123873 3.1
123798 190.26

Your script needs to update each account in A, subtracting the debits and adding the credits.

Realize that A(1,1) = 132435, which is the first account number and A(1,2) = 100.00, which is the initial

balance in that account.

but should also be able to ,

a.

If an account has a debit or credit recorded but is not in the account list in A, the

account should be added to the list and the new balance reflected.

b. At the end of the process, a new array D is created that is a list of the accounts with a

negative balance, along with their respective balances.

You should make use of for loops and of if statements to accomplish the objective of this script.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2015 Porto Portugal September 7 11 2015 Proceedings Part 1 Lnai 9284

Authors: Annalisa Appice ,Pedro Pereira Rodrigues ,Vitor Santos Costa ,Carlos Soares ,Joao Gama ,Alipio Jorge

1st Edition

3319235273, 978-3319235271

More Books

Students also viewed these Databases questions