Question

What will be the maximum value in the vector series sums after the function executes with k- 4? Input your answer with four d
The purpose of lines 10 and 11 is to (select all that apply) Select all that apply Determine the number of times the for loop
If the function is called with the command >>[x,y] geom2(8), how many elements in the variable series sums will be equal to 0
Which of the following commands would have the EXACT SAME result as line 13 in the for loop assuming nothing else in the code
What will be the maximum value in the vector series sums after the function executes with k- 4? Input your answer with four decimal places.
The purpose of lines 10 and 11 is to (select all that apply) Select all that apply Determine the number of times the for loop will iterate. Calculate the first term in both vectors since the for loop starts with k - 2. Preallocate the variables series_vector and series sums so the code runs more efficiently. None of these options apply. Define the variable series sums so line 14 does not cause an error the first time through the loop.
If the function is called with the command >>[x,y] geom2(8), how many elements in the variable series sums will be equal to 0.5 after line 14 has executed with k 6? 4 2
Which of the following commands would have the EXACT SAME result as line 13 in the for loop assuming nothing else in the code is changed? series_vector(k) - series_ vector(k-1)*1/2; series vector(k) = 1/2^(1:N); None of these answer choices are correct. series_vector(N) - 1/24k; series_ vector - [series_vector 1/24k];
0 0
Add a comment Improve this question Transcribed image text
Answer #1

`Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

1) OPTION B IS CORRECT

2) OPTION C IS CORRECT

3) OPTION A IS CORRECT

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
What will be the maximum value in the vector series sums after the function executes with k- 4? I...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What is the value of  result after the following code executes?   int a = 60; int b...

    What is the value of  result after the following code executes?   int a = 60; int b = 15; int result = 20; if (a = b) result *= 3; 30 20 60 10 code will not execute The numeric data types in C++ can be broken into two general categories which are integers and floating-point numbers singles and doubles real and unreal numbers numbers and characters numbers and literals Which line in the following program will cause a compiler error?...

  • Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts...

    Question 1 2 pts The preprocessor executes after the compiler. False True Question 2 2 pts What code is human-readable and follows the standards of a programming language? Secret code Source code Key code None of these Machine code Question 3 2 pts What is the symbol that marks the beginning of a one line comment? Question 1 2 pts The preprocessor executes after the compiler. True False Question 5 2 pts A statement that may be used to stop...

  • 1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector...

    1) a) Write MATLAB function that accepts a positive integer parameter n and returns a vector containing the values of the integral (A) for n= 1,2,3,..., n. The function must use the relation (B) and the value of y(1). Your function must preallocate the array that it returns. Use for loop when writing your code. b) Write MATLAB script that uses your function to calculate the values of the integral (A) using the recurrence relation (B), y(n) for n=1,2,... 19...

  • (Python) Write a program called sales.py that uses a list to hold the sums of the...

    (Python) Write a program called sales.py that uses a list to hold the sums of the sales for each month. The list will have 12 items with index 0 corresponds with month of “Jan”, index 1 with month “Feb”, etc. o Write a function called Convert() which is passed a string which is a month name (ex. “Jan”) and returns the matching index (ex. 0). Hint – use a list of strings to hold the months in the correct order,...

  • Please answer "b" only. %Example code function plotFS(m); %m = user provided number of terms desired in the Fou...

    Please answer "b" only. %Example code function plotFS(m); %m = user provided number of terms desired in the Fourier series; %this code computes the Fourier series of the function %f(x)=0, for -pi<= x <0, % =cos(x) for 0<= x <pi %generate the interval from -pi to pi with step size h; h = pi/100; xx1=[-pi:h:0]; xx2=[0:h:pi]; xx = [xx1, xx2]; %generate the given function f so that it can be graphed ff = [zeros(size(xx1)), cos(xx2)]; %compute the first partial sum...

  • Questin 1 (CO 2) Which of the following is not a valid name in python? last_name...

    Questin 1 (CO 2) Which of the following is not a valid name in python? last_name lastName last name lname Question 2 (CO 3) How many times will “Hello World” be displayed after the following code executes? num=2 while num<12:     print("Hello world")     num+=2 2 12 5 4 Question 3 (CO 1) The following code contains an error, what type of error is it and what line number is it? 1 count=1 2 while count<4 3    print("count = ",...

  • SIMULINK the first function is already simplified and located in the block: NOw,I have problem with...

    SIMULINK the first function is already simplified and located in the block: NOw,I have problem with function # 2,I need help to properly put function # 2 in the simulink "trnafer fcn5 'block, ... I cannot add the letter' s' in neither the numerator nor the denominator, because since I already have a script code, it only calls the matlab.m file.That is why '0' or '1' is used in this case to call the code 's' variable. m if I...

  • # After the if statement that follows is executed, what will the value of $discount_amount be?...

    # After the if statement that follows is executed, what will the value of $discount_amount be? $discount_amount; $order_total = 200; if ($order_total > 200) { $discount_amount = $order_total * .3; } else if ($order_total > 100) { $discount_amount = $order_total * .2; } else { $discount_amount = $order_total * .1; }         2         20         40         60 # To open a file in PHP, you use the _________ function.         fopen()        ...

  • Question 1 What is the value of x after the following int x = 5; x++;...

    Question 1 What is the value of x after the following int x = 5; x++; x++; x+=x++; A)14 B)10 C)13 D)15 Question 2 The last line in value returning function (before the }) should contain the word return. True False Question 3 This contains three parts: Void or Data Type the name optional parameter list A)Menu System B)Function Header C)Switch Question 4 What is a variable? A)a pointer B)a place in memory to hold data C)int D)a computer programming...

  • QUESTION 1 Which statement results in the value false? The value of count is 0; limit...

    QUESTION 1 Which statement results in the value false? The value of count is 0; limit is 10. (count != 0)&&(limit < 20) (count == 0)&&(limit < 20) (count != 0)||(limit < 20) (count == 0)&&(limit < 20) 10 points    QUESTION 2 If this code fragment were executed in an otherwise correct and complete program, what would the output be? int a = 3, b = 2, c = 5 if (a > b) a = 4; if (...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT