![johanperezpere51](/avatars/27300.jpg)
johanperezpere51
06.03.2020 •
Engineering
Heat is transferred to 2.0 kg saturated liquid water at 100kPa until (a) it completely converts into saturated vapor, (b) it reaches a temperature of 200 °C at the same pressure. Find the amount of energy required to reach states (a) and (b).
Solved
Show answers
More tips
- H Health and Medicine How to Get Rid of Dandruff?...
- S Sport How to Choose Tennis Rackets?...
- H Health and Medicine AKDS Vaccination: Ensure Your Child s Safety...
- H Health and Medicine Naskol ko Opasen Ukus Kleshcha i Kak Ego Raspoznat...
- C Computers and Internet How to Delete Your Account on Odnoklassniki...
- H Health and Medicine What to Do When Your Jaw Locks Up?...
- G Goods and services What Are the Most Popular Services?...
- P Philosophy How did the concept of module arise in computer science?...
Answers on questions: Engineering
- E Engineering Which machine provides high torque at low speeds? A. internal combustion engine B. generators C. electric motors D. tractors...
- M Mathematics In the national park the ratio of black bears to grizzly bears is 3: 1...
- C Chemistry 1. something must have mass in order to create change. a. true b. false 2. powdered medicine fills a pill capsule. which of the following is the best description of the state...
- E English Main point in turning off dinning in...
- B Biology Differences in female and male reproductive biology have led to different mating strategies for men and women. this is an example of what developmental perspective?...
- B Business Asingle public utilities company is responsible for supplying electricity for an entire state. as a result, the utilities company can set the price of electricity. true /...
- S Spanish Escribe el presente del verbo reflexivo. ella se pone los pantalones....
- E English When an individual looks at the information provided and considers it for evaluation he or she is considered to be the facts given....
- B Business The organization primarily responsible for establishing accounting and reporting standards in the united states is the financial accounting standards board (fasb). true /...
- M Mathematics List s and list t each contain 5 positive integers, and for each list the average (arithmetic mean) of the integers in the list is 40. if the integers 30, 40, and 50 are...
Ответ:
clc;clear;
isLooping = 1;
x = [];
while isLooping
newVal = input("Enter a new value or a negative number to exit loop: ", 's');
newVal=str2num(newVal)
if newVal >= 0
x = [x, newVal];
else isLooping = 0;
end
end
A = x(x>= 90);
B = x(x>= 80 & x<90);
C = x(x>= 70 & x<80);
D = x(x>= 60 & x<70);
F = x(x<60);
sprintf("There are %d elements in A", numel(A))
sprintf("There are %d elements in B", numel(B))
sprintf("There are %d elements in C", numel(C))
sprintf("There are %d elements in D", numel(D))
sprintf("There are %d elements in F", numel(F))
sprintf("The maximum grade is %d", max(X))
sprintf("The minimum grade is %d", min(X))
sprintf("The average grade is %f", mean(X))
Explanation:
The first line clears the workplace, just in case. Then, you defined a variable that will decide if we have to loop or not, and we initialize the grades array as null.
while the lopping flag is on, we ask for a new value, convert it to number, and we check: if it's greater than zero we append it to the grades array, otherise we switch the looping flag off.
At this point, the grades array is filled, and we can compute the required values. To determine the range, we can use a feature in matlab: the line
x>10
will return the positions of the elements in x that are greater than 10. So, if we use that line as a selector:
x(x>10)
we will fetch the actual elements. Using this feature, we can easily fill the range arrays A, B, C, D and F.
Finally, the number of elements in a vector is given by the numel() function, and the max, min and average are given by the built-in functions max, min and mean.