answer the questions using language matlab, in the format here: format('long') % (1.) % S is straightforward S = % Use the given hint to find I. I = % how would you solve for K? K =   v =       % (2.) % what is the gap between adjacent doubles in interval containing 4.259? Write your answer in terms of I. gap = % two adjacent doubles to 4.259 are straightforward. x_adj = % (3.) Think what variable(s) (S,I,K) must change to obtain the new triple of values (S,I,K)   v_adj = % it is recommended that you compare the difference in each variable (S,I,K) found in (1.) and (3.) % before you proceed to the next question.           % (4.) % Finding (S,I,K) should be straightforward.   v1 =   % (5.) % Think how would (S,I,K) be affected in this case.     v1_adj =   % (6.) % what is the gap between adjacent doubles in interval containing values just less than 1? what about just greater than 1?   x1_adj = % You may use the result from (5.) to find the lower adjacent double.

Operations Research : Applications and Algorithms
4th Edition
ISBN:9780534380588
Author:Wayne L. Winston
Publisher:Wayne L. Winston
Chapter21: Simulation
Section: Chapter Questions
Problem 1RP
icon
Related questions
Question

answer the questions using language matlab, in the format here:

format('long')
% (1.)
% S is straightforward
S =
% Use the given hint to find I.
I =
% how would you solve for K?
K =

 
v =

 

 

 
% (2.)
% what is the gap between adjacent doubles in interval containing 4.259? Write your answer in terms of I.
gap =
% two adjacent doubles to 4.259 are straightforward.
x_adj =
% (3.) Think what variable(s) (S,I,K) must change to obtain the new triple of values (S,I,K)

 
v_adj =
% it is recommended that you compare the difference in each variable (S,I,K) found in (1.) and (3.)
% before you proceed to the next question.

 

 

 

 

 
% (4.)
% Finding (S,I,K) should be straightforward.

 
v1 =

 
% (5.)
% Think how would (S,I,K) be affected in this case.

 

 
v1_adj =

 
% (6.)
% what is the gap between adjacent doubles in interval containing values just less than 1? what about just greater than 1?

 
x1_adj =
% You may use the result from (5.) to find the lower adjacent double.

 

 

 
Recall: The only numbers (other than zero) that Matlab can store exactly (i.e., doubles) are of the form
K
252
x = S. 1+
where
2²-1023
S is either +1 or -1
I is an integer between 1 and 2046.
K is an integer between 0 and 252 - 1.
Answer the following questions
1. Find the unique triple of values of input variables (S, I, K) which outputs x = 4.259, and store it in a variable named v as a row vector in the same order. Hint: "what value of I
does 4.259 belong to the interval of the form: [21-1023, 27-1022) ?"
2. Find two adjacent doubles to 4.259. (i.e., the lower and upper adjacent doubles to 4.259.) Store the values in a variable x_adj as a column vector in an ascending order.
3. Find the unique triple of values of input variables (S, I, K) which outputs the lower adjacent double to 4.259, and store it in a variable named v_adj as a row vector in the
same order.
4. Find the unique triple of values of input variables (S, I, K) which outputs x = 1, and store it in a variable named v1 as a row vector in the same order.
5. Find the unique triple of values of input variables (S, I, K) which outputs the lower adjacent double to 1, and store it in a variable named v1_adj as a row vector in the same
order.
6. Find two adjacent doubles to 1. Store the values in a variable x1_adj as a column vector in an ascending order.
Transcribed Image Text:Recall: The only numbers (other than zero) that Matlab can store exactly (i.e., doubles) are of the form K 252 x = S. 1+ where 2²-1023 S is either +1 or -1 I is an integer between 1 and 2046. K is an integer between 0 and 252 - 1. Answer the following questions 1. Find the unique triple of values of input variables (S, I, K) which outputs x = 4.259, and store it in a variable named v as a row vector in the same order. Hint: "what value of I does 4.259 belong to the interval of the form: [21-1023, 27-1022) ?" 2. Find two adjacent doubles to 4.259. (i.e., the lower and upper adjacent doubles to 4.259.) Store the values in a variable x_adj as a column vector in an ascending order. 3. Find the unique triple of values of input variables (S, I, K) which outputs the lower adjacent double to 4.259, and store it in a variable named v_adj as a row vector in the same order. 4. Find the unique triple of values of input variables (S, I, K) which outputs x = 1, and store it in a variable named v1 as a row vector in the same order. 5. Find the unique triple of values of input variables (S, I, K) which outputs the lower adjacent double to 1, and store it in a variable named v1_adj as a row vector in the same order. 6. Find two adjacent doubles to 1. Store the values in a variable x1_adj as a column vector in an ascending order.
1 format ('long')
2% (1.)
3% S is straightforward
4 S =
5% Use the given hint to find I.
6 I =
7% how would you solve for K?
8 K =
9
10 V =
11
12
13
14 % (2.)
15 % what is the gap between adjacent doubles in interval containing 4.259? Write your answer in terms of I.
16 gap
=
17% two adjacent doubles to 4.259 are straightforward.
18 x_adj =
19% (3.) Think what variable(s) (S,I,K) must change to obtain the new triple of values (S,I,K)
20
21 v_adj =
22% it is recommended that you compare the difference in each variable (S,I,K) found in (1.) and (3.)
23% before you proceed to the next question.
24
25
26
27
28
29 % (4.)
30 % Finding (S,I,K) should be straightforward.
31
32 v1 =
33
34 % (5.)
35% Think how would (S,I,K) be affected in this case.
36
37
38 v1_adj =
39
40% (6.)
11 O what
is
the gan between adiacent doubles in interval containing values just less than 12 what about just greater
Transcribed Image Text:1 format ('long') 2% (1.) 3% S is straightforward 4 S = 5% Use the given hint to find I. 6 I = 7% how would you solve for K? 8 K = 9 10 V = 11 12 13 14 % (2.) 15 % what is the gap between adjacent doubles in interval containing 4.259? Write your answer in terms of I. 16 gap = 17% two adjacent doubles to 4.259 are straightforward. 18 x_adj = 19% (3.) Think what variable(s) (S,I,K) must change to obtain the new triple of values (S,I,K) 20 21 v_adj = 22% it is recommended that you compare the difference in each variable (S,I,K) found in (1.) and (3.) 23% before you proceed to the next question. 24 25 26 27 28 29 % (4.) 30 % Finding (S,I,K) should be straightforward. 31 32 v1 = 33 34 % (5.) 35% Think how would (S,I,K) be affected in this case. 36 37 38 v1_adj = 39 40% (6.) 11 O what is the gan between adiacent doubles in interval containing values just less than 12 what about just greater
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Computational Systems
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
Recommended textbooks for you
Operations Research : Applications and Algorithms
Operations Research : Applications and Algorithms
Computer Science
ISBN:
9780534380588
Author:
Wayne L. Winston
Publisher:
Brooks Cole
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning