Algorithm 6
First draw a flow chart then create a function with the header [X, i] = lowest(A) that will find
the lowest value of the array A and output the value in X and the index (location) of that value in
i. This function should work for an array A of any length
Hint: the length() function may be of use
Rules: you cannot use the MATLAB sort() function and you cannot use the max( ) or mind
) functions (or any variations of these functions)
Check your function:
[X, i]
= lowest([19, 24, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 32])
X =
1
i =
11
=
Algorithm 7
Create a function with the header [X] mysort(A) that will sort the array A from lowest to
highest and output the sorted array as X.
Hint: you can use the lowest function that you wrote for Algorithm 6 in this function to do an
selection sort (but you do not have to do this if you are doing a bubble sort)
Rules: you cannot use the MATLAB sort() function and you cannot use the max( ) or mind
) functions (or any variations of these functions)
Check your function:
>> [sorted]
=
mysort([19, 24, 2, 3, 4, 5, 6, 7, 8, 9, 1, 2, 3, 32])
sorted =
1
2 2 3 3
4 5 6 7
8 9
19
24
32

Purchase answer to see full
attachment




Why Choose Us

  • 100% non-plagiarized Papers
  • 24/7 /365 Service Available
  • Affordable Prices
  • Any Paper, Urgency, and Subject
  • Will complete your papers in 6 hours
  • On-time Delivery
  • Money-back and Privacy guarantees
  • Unlimited Amendments upon request
  • Satisfaction guarantee

How it Works

  • Click on the “Place Order” tab at the top menu or “Order Now” icon at the bottom and a new page will appear with an order form to be filled.
  • Fill in your paper’s requirements in the "PAPER DETAILS" section.
  • Fill in your paper’s academic level, deadline, and the required number of pages from the drop-down menus.
  • Click “CREATE ACCOUNT & SIGN IN” to enter your registration details and get an account with us for record-keeping and then, click on “PROCEED TO CHECKOUT” at the bottom of the page.
  • From there, the payment sections will show, follow the guided payment process and your order will be available for our writing team to work on it.