1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
icang [17]
3 years ago
15

Matlab In this assignment you will write a function that will calculate parallel resistance for up to 10 parallel resistors. Cal

l the function by ParallelR(Number), where Number is an integer between 1 and 10 which will be input from a command window prompt. Use a for loop Number times to find the Numerator and Denominator for parallel resistance. After the for loop you should find Solution as Num/Den. the number Solution will be returned by the function.

Computers and Technology
1 answer:
Ket [755]3 years ago
8 0

Answer:

The complete Matlab code along with step by step explanation is provided below.

Matlab Code:

function Req=ParallelR(Number)

Number=input('Please enter the number of resistors: ');

if Number>10 | Number<=0

   disp('Invalid input')

return

end

R=0;

for i=1:Number

r=input('Please enter the value of resistor: ');

R=R+1/r;

end

Req=1/R;

end

Explanation:

Parallel resistance is given by

\frac{1}{Req} = \frac{1}{R_{1}} + \frac{1}{R_{2}} + \frac{1}{R_{3}}...+\frac{1}{R_{N}}

First we get the input from the user for how many parallel resistors he want to calculate the resistance.

Then we check whether the user has entered correct number of resistors or not that is from 1 to 10 inclusive.

Then we run a for loop to get the resistance values of individual resistors.

Then we calculated the parallel resistance and keep on adding the resistance for N number of resistors.

Output:

Test 1:

Please enter the number of resistors: 3

Please enter the value of resistor: 10

Please enter the value of resistor: 20

Please enter the value of resistor: 30

ans =       60/11

Test 2:

Please enter the number of resistors: 11

Invalid input

Test 3:

Please enter the number of resistors: 0

Invalid input

You might be interested in
The _____ feature automatically corrects typing, spelling, capitalization, or grammar errors as you type them.
Snezhnost [94]
Autocorrect is the answer
6 0
3 years ago
Which of the following enable unauthorized access to your network, and by extension, the sensitive documents, proprietary code,
oksano4ka [1.4K]

Answer:

(a) Weak passwords

Explanation:

Typically, a password is weak if it is easily discovered by all persons including unauthorized users. When passwords to a network are weak, the network is vulnerable to unauthorized access and may permit access to proprietary code, accounting files and other sensitive documents in the network.

Examples of weak passwords are;

i. those generated from the name of a user.

ii. those generated for a user by default.

iii. those generated from words from dictionary or other similar materials.

iv. those that don't include a combination of letters and numbers and even symbols.

v. those that are short in length e.g less than 8 characters.

3 0
3 years ago
Read 2 more answers
What do the points do
Kamila [148]
Add a score to your achieve of correctly answered questions. Which then will determine how much of a Genius you are.
8 0
3 years ago
Read 2 more answers
You are an inexperienced excel user and don't know how to create your own formulas. you want to use one of the preconfigured for
Evgen [1.6K]

The answer is : Click the Insert Formula icon on the Formulas tab ribbon. The formula bar is located just below the Ribbon. It displays the contents of the active cell. It can also be used for entering or editing data and formulas. Found on the left of the formula bar, the insert icon dialog box helps the user identify and implement functions, a type of formula that performs specialized and group calculations.

4 0
3 years ago
Read 2 more answers
You’re using Disk Manager to view primary and extended partitions on a suspect’s drive. The program reports the extended partiti
Sever21 [200]

Answer:

<em>b. There’s a hidden partition. </em>

Explanation:

The hidden partition <em>is a separate section set aside on OEM computer hard drives, often alluded to as the recovery partition and restore partition.</em>

This portion of memory is used by the manufacturer to preserve the data used to restore your computer to its default settings.

This function is particularly useful as it does not involve the CD or DVD of the operating system.

6 0
3 years ago
Other questions:
  • What should you use as the argument for the goto() command?
    6·1 answer
  • What is one example of technology influencing health​
    9·1 answer
  • Suppose you are given a string containing only the characters ( and ). In this problem, you will write a function to determine w
    12·1 answer
  • What would be the most popular piece of technology on Earth?
    11·2 answers
  • All of the following changes have created an urgent need for centralization except: Select one: a. The Internet boom inspired bu
    7·1 answer
  • A regular polygon is an n-sided polygon in which all sides are of the same length and all angles have the same degree (i.e.,the
    15·1 answer
  • Theodor is researching computer programming. He thinks that this career has a great employment outlook, so he'd like to learn if
    9·2 answers
  • Assume the existence of an UNSORTED ARRAY of n characters. You are to trace the CS111Sort algorithm (as described here) to reord
    14·1 answer
  • Which of these can be represented visually by a flowchart?
    11·2 answers
  • In the bremmer article, the author states that _________ translates into greater risks.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!