- Details
- Parent Category: Programming Assignments' Solutions
We Helped With This MATLAB Programming Homework: Have A Similar One?
SOLVED

Short Assignment Requirements
just basic matlab everything is described in the attachement
Assignment Image
![MATLAB Assignment Description Image [Solution]](/images_solved/536580/1/im.webp)
Project (MATLAB)
The aim of this project is to write a MATLAB function file which can divide two real numbers and
display the answer with three decimal digits.
1.1 Background
Division means finding what number times the divisor will equal the dividend. For (= q), a is
dividend, b is divisor and q is quotient. If b cannot divide a completely and we get reminder r (a =
bq + r). In this case, equation will be re write as (a - bq=r) whan q is the number of repetition of
subtraction of b from a until the reminder is positive (r => 0) and smaller than divisor. In more
professional way we put the reminder in the quotient by using decimal. Therefore, Decimal is
represented reminder as a portion of divisor.
For example when you divide 18 by 9 you get 2 for quotient and zero for reminder which means you
can subtract 9 from 18 two times. Now assume that you want to divide 22 by 5. The quotient is 4 and
reminder is 2 which means you can subtract 5 from 22 for four times and get 2 as a reminder. Subtraction
of 5 from 2 is meaningless, but we can say 0.4 of 5 can subtract 2 and the remainder becomes zero.
Therefore quotient (q) is 4.4 which is the decimal format of quotient.
1.2 Task
You must write a function which get two numbers a and b in which a>b. Then put both number into the
matrix in the way that each number get only one row and each digit get one column. Put zero for empty
arrays. For instance a-34172 and b-423 the matrix D is
D =
(3 4 1 7 21
0 0 4 2 3
You allow to use add and subtraction functions' of MATLAB to find quotient and reminder. If you
have reminder you must find a way to write new matrix which can count the decimal part for three
decimal digits. In the end, shows real part and decimal part any way you want.
Hint: Get a and b in string format, it is easier to handle when you want to put into the matrix. Review:
function, while, for, num2str, str2num, size, if, if else.
Report
This project must be done individually. Write your code in a M file and describe every part and every
parameter' why you make it and how it works. The file without describing is not graded. Please adding