Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1.a Write a matlab function that takes 2 numbers as input parameter taken from a user and returns the greatest one and the lowest one

1.a Write a matlab function that takes 2 numbers as input parameter taken from a user and returns the greatest one and the lowest one as output parameters.

Example: Write a number: 5

Write a number: 12

The greatest one is 12

The lowest one is 5

b Write a matlab function that takes a vector as input parameter and returns the greatest one and the lowest one as output parameters.

Example:

Vector = [5,1,3,4,9,44,12,34,-1]

The greatest one is 44

The lowest one is -1

c Combine a and c into one function by using nargin function.

d Write a matlab function that takes a vector as an input parameter and returns its median

value as output parameter.

Note: You think about length of vector with odd number and even number. You can use

Wikipedia about Median rules.

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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions

Question

LO2 Compare three types of individual incentives.

Answered: 1 week ago