Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Assume a variable named data already exists in the workspace, and contains exactly 4 columns named 2027 vari, var2, var3, and var4. Consider the

3. Assume a variable named data already exists in the workspace, and contains exactly 4 columns named 2027 vari, var2, var3, and var4. Consider the following code snippet: 1 time = data.varl; d1 = data.var2; d2 = data.var3; 4 d3 = data.var4; 5 6 figl = figure(1); 7 title('Three Types of Data'); 8 subplot(3,1,1) 9 plot(time, di, '.'); leylabel('Data Type 1') 11 12 subplot(3,1,2) 13 plot(time, d2, '.'); 14 ylabel('Data Type 2') 15 16 subplot(3,1,3) 17.plot(time, d3, '.'); 18 ylabel('Data Type 3') 19 xlabel('Time (s)'); Think about what would happen by changing certain lines or reordering lines, and answer the following questions. IMAGES NOTES DISCUSS UNITS STATS HELP PREFERENCES Part Answer Save Status Description If lines 1 through 4 were changed to time = data.var2; d1 = data.var4; d2 = data.vari; d3 = data.var3; A. the new program would # tries: 0 Show Details 6.67 pts. 100% 33% try penalty 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error bol bluec x | bdl. bluec x Webl x M Zoon X WHW7 X New X T EF105 x T jzhen X T ms.engr.utk.edu/ef105-2020-08/sys.php?f=assess/main If any of lines 1, 2, 3, or 4 were moved to the end of the program, the program would B. 6.67 pts. 100% # tries: 0 Show Details 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error 33% try penalty If lines 1, 2, 3, and 4 were re- ordered but still were the first four lin the program would C. 6.67 pts. 100% # tries: 0 Show Details 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error 33% try penalty If lines 8 and 9 were reveresed, the new program would D. # tries: 0 Show Details 6.67 pts. 100% 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error 33% try penalty If lines 1 through 4 were changed to time = data.var; d1 = data.var2; d2 = data.var3; d3 = data.var5; E the new program would 6.67 pts. 100% # tries: 0 Show Details 33% try penalty 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error d2 = data.var3; 4 d3 = data.var4; 5 6 fig2 = figure(); 7 plot(time, di, '.') 8 hold on 9 plot(time, d2, '.') 10 plot(time, d3, '.') 11 hold off 12 13 legend('Data Type 1', 'Data Type 2', 'Data Type 3'); 14ylabel('Shared Units (X)'); 15xlabel('Time (s)') 16title('Three Types of Data') Think about what would happen by changing certain lines or reordering lines, and answer the following questions. IMAGES NOTES DISCUSS UNITS STATS HELP PREFERENCES Part Answer Save Status Description If we wanted to modify the program so that data labeled as 'Data Type 2' were plotted as a smooth line instead of discrete points, we would change A. # tries: 0 Show Details 6.67 pts. 100% 1. line 7 to plot(time, di, '*') 2. line 7 to plot(time, di, '-') 3. line 7 to plot(time, di, '0') 4. line 9 to plot(time, d2,'*') 5. line 9 to plot(time, d2, '-') 6. line 9 to plot(time, d2, 'o') 17% try penalty B. # tries: 0 Show Details 6.67 pts. s. 100% 1. Run as berore with no visible change 2. Run without error but produce different results or output 3. Not run due to an error 33% try penalty If lines 14,15, and 16 were reordered but still occured at the end of the program, the new program would c. 6.67 pts. 100% # tries: 0 Show Details 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error 33% try penalty If the input arguments to the legend function on line 13 were in a different order, the new program would D. 6.67 pts. 100% # tries: 0 Show Details 1. Run as before with no visible change 2. Run without error but produce different results or output 3. Not run due to an error 33% try penalty

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

App Inventor

Authors: David Wolber, Hal Abelson

1st Edition

1449397484, 9781449397487

More Books

Students also viewed these Programming questions