Write a MATLAB function for the function f( x , y )=(5 x^ 2) xy +( y^ 2) y call
ID: 2249842 • Letter: W
Question
Write a MATLAB function for the function
f(x , y)=(5x^2)xy+(y^2)y
call it a6fn.m. It must have the interface:
a6fn
General Description
This returns the function:
f(x , y)=5x^2xy+y^2y
Calling Syntax
f=a6fn( x,y )
Input Argument
x , y scalar number.
Return Argument
f scalar Solution to the function.
Additional Specifications and Notes
This function must check to ensure that only one scalar argument is input. If not, a meaningful error message must be issued.
It must return the value to function 5x^2xy+y^2y .
a6fn
General Description
Explanation / Answer
First, you need to create a new m-file then type this code
Save with filename 'a6fn.m'
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.