Question

In: Computer Science

1.If variable Test(i,j) is selected so the first column represents the student number (1,2,..., 32), 2nd...

1.If variable Test(i,j) is selected so the first column represents the student number (1,2,..., 32), 2nd column represents the score of the first homework, 3rd column represents the score of the 2nd homework, etc. If there is a total of 5 homework for this class, what is the size of variable Test ? Explain why, Does (i,i) is the same as rows x columns?

(6,32)

(32,6)

2.If the size of b is shown on the workspace menu for MATLAB as 4x4, what type of variable b is? Explain why

2D matrix

4D matrix

3. If you want to multiply 8 by the result of adding 12 to 5, which command would you use in MATLAB? Explain why

[5+12]*8

(8+12)*5

4. If the following commands are executed in MATLAB
a = [1:5;logspace(2,8,5)]  
How many rows are in a?

2

3

8

5

Solutions

Expert Solution

1. Ans: Correct Option is: (32,6)

EXPLANATION:

If first column represent student number and apart from that there are 5 homework scores, so on total there are 6 columns i.e,:

Stud_Num score1 score2 score3 score4 score5

And since total number of students are 32, therefore there are 32 rows which can be represented as:

A matrix is represented as : (rows columns)

Stud_Num score1 Score2 score3 score4 Score5
1 47 54 44 32 56
2 52 43 23 76 47
: : : : : :
32 43 22 32 32 62

Therefore b) is correct option.

No In Test(i,i), (i,i) is not same as rows columns because (i,i) means (32,32) . But (i,j) is same as rows columns

2. Ans: Correct option is 2D MATRIX

EXPLANATION:

If size of variable 'b' is 4 4, then number of rows will be 4 and number of columns will be 4 i.e, rows columns. Two Dimensional matrix is specified by the number of rows and columns.

So example of 4 4 matrix can be:

—————————————————-

3. Correct option is: [5+12]*8

EXPLANATION:

To add 5 with 12 we have to write expression 5+12 inside bracket i.e, [5+12] and then multiply the expression with 8 i.e, [5+12]*8

—————————————————————————————-—

4. Ans: It will produce two rows.

EXPLANATION:

Basically, In the first rows exponential numbers between 1 and 5 will be produced with each number incremented by 1.

Then the second row will contain the exponential numbers between 10^2 and 10^8.


Related Solutions

32. Gas Prices for Rental Cars The first column of these data represents the prebuy gas...
32. Gas Prices for Rental Cars The first column of these data represents the prebuy gas price of a rental car, and the second column represents the price charged if the car is returned without refilling the gas tank for a selected car rental company. Draw two boxplots for the data and compare the distributions. (Note: The data were collected several years ago.) Prebuy cost                     No prebuy cost $1.55                                $3.80 1.54                                  3.99 1.62                                  3.99 1.65                                 ...
Question 1 Fifteen golfers are randomly selected. The random variable represents the number of golfers who...
Question 1 Fifteen golfers are randomly selected. The random variable represents the number of golfers who only play on the weekends. For this to be a binomial experiment, what assumption needs to be made?    The probability of golfing on the weekend is the same for all golfers    The probability of golfing during the week is the same for all golfers    All fifteen golfers play during the week    The probability of being selected is the same for...
The variable Hours Studied represents the number of hours a student studied for their final exam...
The variable Hours Studied represents the number of hours a student studied for their final exam and the variable Final Exam Grade represents the final exam score the student received on their final exam (out of 100 points).An introduction, explanation/interpretation of your analysis, and a conclusion. Hours studied- 1, 0, 7, 9, 9, 5, 4, 2, 11, 7, 13, 3, 3, 1, 9, 7, 5, 0, 2, 8 Final Exam grade 70, 54, 81, 92, 90, 78, 75, 68, 98,...
(Please use mini tab if possible)The variable Hours Studied represents the number of hours a student...
(Please use mini tab if possible)The variable Hours Studied represents the number of hours a student studied for their final exam and the variable Final Exam Grade represents the final exam score the student received on their final exam (out of 100 points).An introduction, explanation/interpretation of your analysis, and a conclusion. Hours studied- 1, 0, 7, 9, 9, 5, 4, 2, 11, 7, 13, 3, 3, 1, 9, 7, 5, 0, 2, 8 Final Exam grade 70, 54, 81, 92,...
Count the number of flops (floating point operations) in the following pseudocode: for i=1:n   for j=1:i    ...
Count the number of flops (floating point operations) in the following pseudocode: for i=1:n   for j=1:i     for k=j:n       y=y+aijxij     end   end end
Student First Test Grade Second Test Grade 1 81 79 2 55 64 3 52 61...
Student First Test Grade Second Test Grade 1 81 79 2 55 64 3 52 61 4 81 74 5 50 65 6 70 71 7 43 64 8 43 58 9 77 75 10 97 88 11 48 64 12 48 68 13 70 70 14 75 71 15 77 72 16 76 73 17 85 80 18 91 85 19 70 75 20 69 77 21 40 57 Step 1: Enter a negative estimate as a negative number...
1. Describe how one can test for structural breaks using (i) the dummy variable method and...
1. Describe how one can test for structural breaks using (i) the dummy variable method and (ii) the Chow test.
Scenario: On March 28 at 1:30 pm, I randomly selected 10 states and found the number...
Scenario: On March 28 at 1:30 pm, I randomly selected 10 states and found the number of coronavirus cases in each of them.  This gave me an average of 939 cases with a standard deviation of 1543.  Assume the number of cases in each state is normally distributed.  Create a 90% confidence interval for the actual number of coronavirus cases in each state. Question: 3. Using the scenario from question 1, how many states would need to be selected to be 90% confident...
Past experience has shown that, on the average, only one in ten wells drilled hits oil. Let X be the random variable that represents the number of drillings until the first success (oil is struck). Assume that the drillings represent independent events.
(a) List the elements of the sample space for 5 drillings or less. Use W for “success”and F for “failure” in finding an oil well. Is this a discrete sample space Explain.(b)Assign a value to each sample point and find the probability mass function for 5 drillings or less.(c) Express the probability function as a formula for x = 1,2,3 ... ∞.(d)Find P(X = 10) using the formula.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT