Question: in matlab please LAB ACTIVITY 1.16.1: LAB: Ohm's Law This tool is provided by a third party. Though your activity may be recorded, a page
in matlab please


LAB ACTIVITY 1.16.1: LAB: Ohm's Law This tool is provided by a third party. Though your activity may be recorded, a page refresh may be needed to fill the banner. 0/1 Ohm's Law Ohm's Law is an often used relationship between voltage, current and resistance in electric circuits. The relationship states that voltage is equal to current times resistance as shown in the equation below: voltage (volts) = current (amps) * resistance (ohms) Write a program using the variables current (current in amps) and resistance (resistance in ohms). Given current is provided in milliamps (mA) and should be converted to amps (A). Given time is provided in megaohms (M2) and should be converted to ohms (92). Assign the value for the voltage to the variable voltage. Ex: Given currentInMilliamps = 82 resistanceInMegaohms = 91 the output is: voltage - 7462000 1 currentInMilliamps = (randi([1,100],1)) 2 resistanceInMegaohms = (randi([1,100],1)) 3 4 % Convert current from milliamps to amps using the new variable, current 5 6 7 % Convert resistance from megaohms to ohms using the new variable, resistance 8 9 10 % Calculate the voltage using using the variable, voltage 11 12 13 w
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
