Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please answer the following question 1.22 This problem will test your variable handling skills. (a) Write a function called hiddenSum that takes two inputs and

Please answer the following question image text in transcribed

1.22 This problem will test your variable handling skills. (a) Write a function called hiddenSum that takes two inputs and returns the sum of the two inputs. Turn in a printout of the function (b) Write a script M-file called testHiddensum.m that defines two variables x and y. Assign some values to these variables. Call the function hiddenSum from within this script M-file and store the result in a local variable, z. Run the script M-file and turn in a printout with the value of z. (c) Modify the function hiddenSum such that now it DOES NOT HAVE any output arguments. Now modify your script M-file such that it calls hiddensum using x and y as inputs and assigns the result to the variable z. You will need to further modify your function file. Submit a printout of the new function and script files and command prompt results from running your script M- file. (d) Now modify your function hiddenSum such that it DOES NOT HAVE any input OR output arguments. Modify your script M- file such that it calls hiddenSum using x and y as inputs, and stores the result in the variable z. You will need to further modify your function file. Submit a printout of the new function and script files, and the command prompt results from running your script M-file. Table 1.18. Equation Solving Functions 1.22 This problem will test your variable handling skills. (a) Write a function called hiddenSum that takes two inputs and returns the sum of the two inputs. Turn in a printout of the function (b) Write a script M-file called testHiddensum.m that defines two variables x and y. Assign some values to these variables. Call the function hiddenSum from within this script M-file and store the result in a local variable, z. Run the script M-file and turn in a printout with the value of z. (c) Modify the function hiddenSum such that now it DOES NOT HAVE any output arguments. Now modify your script M-file such that it calls hiddensum using x and y as inputs and assigns the result to the variable z. You will need to further modify your function file. Submit a printout of the new function and script files and command prompt results from running your script M- file. (d) Now modify your function hiddenSum such that it DOES NOT HAVE any input OR output arguments. Modify your script M- file such that it calls hiddenSum using x and y as inputs, and stores the result in the variable z. You will need to further modify your function file. Submit a printout of the new function and script files, and the command prompt results from running your script M-file. Table 1.18. Equation Solving Functions

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 And Information Systems 1 International Baltic Conference Dbandis 2020 Tallinn Estonia June 19 2020 Proceedings

Authors: Tarmo Robal ,Hele-Mai Haav ,Jaan Penjam ,Raimundas Matulevicius

1st Edition

303057671X, 978-3030576714

More Books

Students also viewed these Databases questions

Question

3. Is there opportunity to improve current circumstances? How so?

Answered: 1 week ago