Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Using MATLAB, Modify the function mysort() below to sort this vector in ascending order based on the quiz average. vec quiz 2 id no 7.5

Using MATLAB, Modify the function mysort() below to sort this vector in ascending order based on the quiz average.image text in transcribed

vec quiz 2 id no 7.5 5.5 6.5 37 24 4 Modify the function mysort() below to sort this vector in ascending order based on the quiz average. For example, if the vector stores the values shown above, this would be an example of calling mysort: >> sortvec = mysort (vec); >> for i = 1:4 fprintt('ad ave: %.1f ', mean sortveE( 1 ) . quiz ) ) sortvec(1). id-no, 3 ave: 6.0 24 ave: 7.0 ave: 7.5 7 ave:8.0 Your Function 1 function outvmysort(vec) 3 for i1:length(vec)-1 CReset MATLAB Documentation indlow i; for j-i+1: length(vec) if vecj)

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

Conceptual Database Design An Entity Relationship Approach

Authors: Carol Batini, Stefano Ceri, Shamkant B. Navathe

1st Edition

0805302441, 978-0805302448

Students also viewed these Databases questions