Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please solve using MATLAB. Will rate!! 4. Construction of user-defined functions (numerical solvers) Write an user-defined function FunTestl with input variables A and k and

Please solve using MATLAB. Will rate!!

image text in transcribed

4. Construction of user-defined functions (numerical solvers) Write an user-defined function FunTestl with input variables A and k and output variable y. The variable A is a two-dimensional data array (matrix). The function will first divide, element by element, the k-th row of A by the (k+2)-th row of A, then sum all the elements of the resulting vector and return this value to the output variable y. Note that an error message should be displayed if k+2 is larger than the number of rows of A. Cut and paste the completed m-file below ) Benchmark testing is an important tool learned in BE 1500. Benchmark test your function on A-gnea (20,50) and k-13. The expected answer for the output is y-50 b) Apply your function to a 8x6 matrix A constructed by multiplying a column vector [ 1 : 8] . ' to a row vector of [ 1 : 6] , and k

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

Build It For The Real World A Database Workbook

Authors: Wilson, Susan, Hoferek, Mary J.

1st Edition

0073197599, 9780073197593

More Books

Students also viewed these Databases questions