ASE 201 - Assignment due Oct 12

ASE 201 - Assignment due Oct 12 - Assignment Button...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Assignment Button Function Class Goals 1. To be able to use write functions in MATLAB 2. To write functions which call other functions. 3. To create functions that use persistent variables. 4. To create a program using the functions you have written Reading: Chapter 5.3- 8 Exercises: (1 pt) 1. Write a function called MaxMin(X) which will return the max and min values in an array. Use a loop and array notation. Do not print in your function. Include a flow diagram of your function. (1 pt) 2. I have defined 3 arrays x, y and z in the data file, MaxMin.mat. Load my data file. For each of the arrays, print the array, find and print the max and min values of the array using your function. Include appropriate labels. (You will call your function 3 times.) PROGRAM: (2 pts) 1. Write a function called button(), with no input, which will change the value of an output variable in persistent memory from 0 to 1 or 1 to 0, each time it is called. You must test to see if the variable has ever been set. If it has not (variable is empty) you will set the value to 1 (ie turn it on) the
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 2

ASE 201 - Assignment due Oct 12 - Assignment Button...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online