Select Page

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)
[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)
>> [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

attachment

#### Why Choose Us

• 100% non-plagiarized Papers
• 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.