Question: Part 2 ( week 7 ) : User - Defined Functions For this part of the practical, you're required to enhance your program from part
Part week : UserDefined Functions
For this part of the practical, you're required to enhance your program from
part by including a userdefined function that handles the mathematics
required to decode the resistor colour codes.
Your program must be structured as follows:
Your main MATLAB script must handle the userinterface elements
of your program only. I.e it will contain the menu system, user input
and the code that outputs the final answer to the Command Window.
Your main MATLAB script must also call your userdefined function
from within its code.
Your userdefined function must only handle the mathematical
elements of the colour code decoding. The resistor's value and
tolerance will then be returned from your function back to your main
script.
Error checkinginput validation may be included in both your main
script and userdefined function where relevant.
Please ensure you've watched the lecture videos on userdefined
functions week lecture and ask teaching staff questions about this if
you're stuck.
Please also refer to the list of useful functions at the end of this
document Table I for some of the functions available in MATLAB that
will help with writing userdefined functions.
This program must still work for both and band resistor types.
Your program must still be a textbased user interface not a Graphical User
Interface GUI
Refer to the sample program we tested in class during the week lectorials for
suggestions on how your program could work.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
