Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Homework Help/Study Tips Expert

Write a function that accepts a variable number of input parameters using the cell array varargin, and outputs a variable number of arguments using the cell array varargout. Your function should examine each input argument in varargin to make sure it is numeric. If it is not numeric it should be ignored. If it is numeric, it should be added to a running total and each element counted. Your function should return three items: the count of numbers passed in to the function, the sum of the numbers, and the average of the numbers. Note: the numeric arguments passed in may be arrays, in which case you will need to deal with each of the numeric entries individually.

To test your function, you should write a test program that calls your program. If you call your program with the following data, your answers should be as shown below:

Data: a=5; b=[1 2 3 4; 5 6 7 8; 9 10 11 12]; c=[1 2 3];

Result: Count = 16, Sum = 89, Average = 5.5625

Be sure to handle the case where the function is called with more output arguments than what your function is designed to handle. Your test program should try calling your function with one, two, three and four output arguments. We won’t pass in any arrays with more than two dimensions, but you will need to be careful when summing the numbers in an array.

Homework Help/Study Tips, Others

  • Category:- Homework Help/Study Tips
  • Reference No.:- M9870971

Have any Question?


Related Questions in Homework Help/Study Tips

Question hoosier media inc your consulting firm is now

Question: Hoosier Media, Inc. Your consulting firm is now ready to present suggestions regarding the strategic plan of Hoosier Media, Inc. In a 10- to 20-slide presentation with speaker notes, address the following which ...

Assignment - virtualisation in computingoverview -the

Assignment - Virtualisation in Computing Overview - The System Center Virtual Machine Manager (SCVMM) offers numerous benefits to virtual infrastructures. This assignment will explore more of the features that are offere ...

Quesiton about your signature assignmentsignaturebenchmark

Quesiton: About Your Signature Assignment Signature/Benchmark Assignments are designed to align with specific program student learning outcome(s) in your program. Program Student Learning Outcomes are broad statements th ...

Final papereach student will submit an eight-to-ten page

Final Paper Each student will submit an eight-to-ten page paper (excluding the title and reference page) that is sufficiently supported by research, data, and substantiated theory or application. In addition, and most im ...

Question the primary goal of this literature review is to

Question: The primary goal of this literature review is to integrate concepts from four different content domains within the larger field of psychology. The four content domains should be chosen from previous coursework ...

Question - complete initial post and at least one response

Question - Complete initial post and at least one response in the discussion forum (see attached description and rubric). Your initial post is due by the end of Day 5 (minimum 400 words), and your response to a peer is d ...

You are the public health director for the city the

You are the public health director for the city. The controversial issue of adding fluoride to water is up for discussion before the City Council. Prepare a presentation (8-12) slides presenting the pros and cons of addi ...

Introductionto show your ability to create an

Introduction To show your ability to create an object-oriented program, you will construct the Java application as detailed in this document. Your work will be assessed not only on the basis of how well the program works ...

Introduction to program evaluationdiscuss and define at

Introduction to Program Evaluation Discuss and define at least two descriptions of program evaluation. What is the difference between formative and summative evaluation? Briefly describe a scenario where each one would a ...

Describe three assistive technology devices you would

Describe three assistive technology devices you would recommend to teachers who have students with special communication need?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As