Question

For the unit 7 Programming Assignment, we will implement a function grapher. Essentially you must create...

For the unit 7 Programming Assignment, we will implement a function grapher. Essentially you must create a program that can plot a function that is in the form
z = f(x,y)
Your program must generate input values between -1 and 1 in increments of .1 and use this to plot x, y, and z vertices to be included as part of a mesh that will then be graphically displayed.
If you would like you can implement the functionality to allow both the function to be mapped as expressed as a mathematical formula and the input values to be entered by the user of your program, however, this is optional.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

%% MATLAB Code %%

close all;

f = @(x, y) x.^2 + y.^2;
grapher(f);

function grapher(f)
    [X, Y] = meshgrid(-1:.1:1, -1:.1:1);
    mesh(X, Y, f(X, Y));
end

%% Code Screenshots and Test-Output

Add a comment
Know the answer?
Add Answer to:
For the unit 7 Programming Assignment, we will implement a function grapher. Essentially you must create...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Using Java programming language Your assignment is to implement a recursive reverse sorting algorithm. It should...

    Using Java programming language Your assignment is to implement a recursive reverse sorting algorithm. It should meet the following requirements: 1. The program shall graphically prompt the user for a file. 2. The program shall read the selected file which will contain 1 integer per line. 3. The program shall sort the values it reads from the file from largest to smallest. 4. The program shall write the values to an output file from largest to smallest in the same...

  • Pascal programming language Implement a symbol balance checker function for the Pascal programming language. Pascal allows...

    Pascal programming language Implement a symbol balance checker function for the Pascal programming language. Pascal allows for the following pairs: {}, (), [], begin end . All programs will begin with the word "begin" and end with the word "end". Your function should receive an ifstream object which is already open and will return true, all of the symbols match, or false, they do not. You do not have to worry about comments in the program but you do have...

  • IMPLEMENT IN C++ Implement a symbol balance checker function for the Pascal programming language. Pascal allows...

    IMPLEMENT IN C++ Implement a symbol balance checker function for the Pascal programming language. Pascal allows for the following pairs: {}, (), [], begin end . All programs will begin with the word "begin" and end with the word "end". Your function should receive an ifstream object which is already open and will return true, all of the symbols match, or false, they do not. You do not have to worry about comments in the program but you do have...

  • Here I am asked to create a program using functions and files in python 3.7. I...

    Here I am asked to create a program using functions and files in python 3.7. I am unfortunately not able to use lists in the project. Thanks CSE 231 Fall 2019 Programming Project 05 This assignment is worth 45 points (4.5% of the course grade) and must be completed and turned in before 11:59 PM on Monday, October 14, 2019. Assignment Overview 1. Functions 2. File input and output 3. try-except Computational facial recognition is growing. Starting with the iPhone...

  • Create a 3-D mesh plot of the function Z 1 / 1 + 0.5 x + y-1 ). Let both x and y vary from-4 to +...

    HELP WITH MATLAB PRGRAM! Please only use matlab to slove this program! Thank you! Create a 3-D mesh plot of the function Z 1 / 1 + 0.5 x + y-1 ). Let both x and y vary from-4 to +4. La e and title the plot "Jack and Jill'sHill" (be sure the single quote in the word Jill's is in the title) ex y, anď z axes T stance East n · Distance North n andĺ Height (m) Create...

  • must be python programming. consider function f(x) = sin(x) in the range of 0to pi. create...

    must be python programming. consider function f(x) = sin(x) in the range of 0to pi. create a python code to calculate f’ (derivative of f(x)) in this range and plot these points. calculate the error at all the discrete points. Please do not use Numpy you can use matplotlib

  • In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language to...

    In this assignment, you will implement a deterministic finite automata (DFA) using C++ programming language to extract all matching patterns (substrings) from a given input DNA sequence string. The alphabet for generating DNA sequences is {A, T, G, C}. Write a regular expression that represents all DNA strings that contains at least two ‘A’s. Note: assume empty string is not a valid string. Design a deterministic finite automaton to recognize the regular expression. Write a program which asks the user...

  • python: def functionSolver(function: callable)->str You will be given a function as a parameter, the function you...

    python: def functionSolver(function: callable)->str You will be given a function as a parameter, the function you are given only accepts two number parameters and produces a float value. It is your job to figure out what mathematical operation the function you are given is performing by passing it many different parameters. The possible operations the function can perform are: add, subtract, multiply, and divide. The given function will only perform a single operation, it will not change after consecutive invocations....

  • For the sixth question of this assignment, you must design and implement a function that takes...

    For the sixth question of this assignment, you must design and implement a function that takes a Graph as its first argument and a Node as its second argument and has a list of Nodes (i.e., a [Node] as its return value). The return value must be the list of Nodes traversed by a breadth-first search traversal of the Graph argument, starting from the Node argument, in the order in which they appear during the traversal. When your breadth-first search...

  • You recently graduated college and you are applying for a programming job that requires the understanding...

    You recently graduated college and you are applying for a programming job that requires the understanding of loops in Python. The manager you are interviewing with has asked you to take an assessment to prove your programming knowledge. Below are the requirements for the programming skills test. In Python, create a program that meets the following requirements: Take two integers from the user. Save the lower number as x. Save the largest integer as y. Write a loop that counts...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT