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
What steps should be taken to dispose of and recycle plastic?
WARRIOR [948]
Step 1: Collection. The first step in the recycling process is always collecting the plastic material that is to be recycled. ...
Step 2: Sorting. ...
Step 3: Washing. ...
Step 4: Resizing. ...
Step 5: Identification and separation of plastics. ...
Step 6: Compounding.
3 0
3 years ago
Outline a scenario in which you might be acting ethically but might still want to remain anonymous while using the Internet. How
kompoz [17]

Answer:

I would like to stay anonymous while criticizing the current government. As there have been many cases when people who wrote against the government's decisions were caught by the police.

So I would prefer to stay anonymous while commenting on various government policies. My friends would know about it because I share my posts only with them.

The government can know about my identity by ordering the social networking site to reveal it.

8 0
3 years ago
Jordan has been asked to help his company find a way to allow all the workers to log on to computers securely but without using
lana66690 [7]

Answer:

Webcam

Explanation:

A webcam is mainly used for taking images or videos from the computer. the webcam is a combination of two basic words i.e. web and camera. webcam can be connected to any computer via USB. It can be mounted on the desktop and sometimes it comes inbuilt on the laptops.

A webcam is also used for face recognition function to login to a computer system.

so according to the scenario, the most appropriate answer is a webcam.

6 0
3 years ago
Cloud computing service providers manage different computing resources based on the services they offer. Which resources do IaaS
eimsori [14]

Answer:

1. C.operating system

2. A.applications

Explanation:

1. The Iaas is the infrastructure as a service, and storage, server, and network are the infrastructures. However, the Operating System is the platform, and hence it is the correct option for the first blank. We need to understand the exact meaning of the IaaS, PaaS and the SaaS as well as MaaS, to better understand cloud computing.

2. In the second case, we have been asked about the option that is not being covered by the PaaS, and Paas stands for the platform as a service. And the interface, storage, and virtualization is the platform whereas the Applications is an example of software. And it is being managed by SaaS, Hence, the correct option is A. Applications.

7 0
3 years ago
The while loop and the do loop are equivalent in their expressive power; in other words, you can rewrite a while loop using a do
sleet_krkn [62]
I think False...

I hope this helps
8 0
2 years ago
Other questions:
  • When your Windows XP file becomes too large to fit in a single window, which of these components allows you to bring different p
    6·1 answer
  • In what sense are hardware and software equivalent
    6·1 answer
  • Why is Abraham called the Father of Believers?
    6·1 answer
  • Suppose there are two links between a source and a destination. The first link has transmission rate 100 Mbps and the second lin
    12·1 answer
  • In the code snippet, what is the “win” part called in programming?
    12·1 answer
  • In the list [0, 13, 5.4, "integer"], which element is at index 2?
    11·1 answer
  • Select the best answer from the drop-down menu.
    14·2 answers
  • Java question
    15·1 answer
  • I have no idea which one please help!
    6·2 answers
  • I need help with humans need not apply for codeing
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!