Question: Homework Assignment # 3 - Part 1 This assignment is worth 1 0 0 points and consists of two parts. This is Part 1

Homework Assignment \#3- Part 1
This assignment is worth 100 points and consists of two parts. This is Part 1, which covers symbolic mathematics. Part 2 will cover user defined functions. Both Part 1 and 2 are due Tuesday, October 29\({}^{\text {th }}\) on Canvas. Code must be written in MATLAB, be well documented, and be composed as follows: Part 1 should be solved with one \( M \) file using sections. Part 2 should be solved with multiple function files and a single script using sections that calls your functions.
1. Consider Ohm's law, which describes the relationship between voltage ( V , in Volts), current (I, in Amperes) and resistance ( R , in Ohms). The equation is as follows:
\[
V=I R
\]
Use the Problem-Solving Framework and the Symbolic Mathematics capabilities of MATLAB to solve the problem below. The written answers of the problem-solving framework can be added as comments in your script (remember, state the problem, describe inputs and outputs, and your algorithm for solving the problem).
Given \( V=12\mathrm{~V}\) and \( I=2\mathrm{~A}\), find the resistance R .
2. Consider the equation below. The script below it attempts to perform the following: (1) implements this equation in MATLAB as a symbolic equation, (2) tries the expand and simplify functions and displays the results, and (3) solves for \( x=2\). However, the code has bugs, and therefore, does not run properly. Copy the code into your script, debug the code, comment each line, and for each line where a bug was found, describe how you fixed the bug.
\[
y=(x+2)(x-3)(x+1)
\]
clear
clc
syms x
Eqn \(=\mathrm{y}=(\mathrm{x}+2)*(\mathrm{x}-3)*(\mathrm{x}+1) ; \)
\(\operatorname{expd}(\) Eqn \()\)
simple(Eqn)
double(dsolve(subs(Eqn,x,2),y))
Homework Assignment \ # 3 - Part 1 This

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!