
| Line # | Statement | Output |
| 1 | x = [1, 4, 9] |
1 4 9 |
| 2 | x=sqrt(x) |
1 2 3 |
| 3 | x = sqrt(x^2) |
syntax error |
| x = sqrt(x.^2) |
1 2 3 |

1. (6%) Let the following Octave statements be executed in the order shown sequentially Determine the...
1.) If the commands below will be executed in order, determine the output of the 4 echo commands (labeled as A-D): (2 Marks) ra7 export b=9 echo $r 9=3 echo $b -B be8 bash echo $g exit echo $b -D exit ii.) Given the contents of file (filename: /home/user5/table) below, write the single command line needed to perform the following tasks. 7 2 Services 1 Executive Summary 1.1 Olives 12 6 Financial Plan Important Assumption Startup Funding Requirements Other Current...
The following individual two programs are using while loop in order to print a specific output: The outputs of the first program are: 10 9 8 5 4 The outputs of the second program are: 123456789 Using the Table 3.1 below, allocate the error(s) of each line of two programs and type of error: The first program: public Main { public static void main(String args[]){ int i=10 while(i>4){ System.out.print(i); i++; } } } The second program: public class Main {...
,,1. Which of the following statments are valid C++ statements? A) cout << "Hello World" : B) cout << Hello World; C) cout << "Hello " << "World" ; D) cout << "Hello" << "World" ; 2. What is the difference between the literals 'A' and "A"? ,3. Read the input from user; Check for valid entries If input is invalid: print an error message; else: calculate the result and print to the console; exit; The code snippet above may...
Write Matlab Determine the constant of array A after the following statement are executed A=[4 7 3; 9 12 6; 7 6 9] i. A([1,3],:)=A([2],:) ii. C=eye(3,3) b=[1 2 3] C(2,:)=b
The following individual two programs are using while loop in order to print a specific output: The outputs of the first program are: 10 9 8 5 4 The outputs of the second program are: 123456789 Using the Table 3.1 below, allocate the error(s) of each line of two programs and type of error: The first program: public Main { public static void main(String args[]){ int i=10 while(i>4){ System.out.print(i); i++; } } } The second program: public class Main {...
Use Octave
5:04 < Back HW06-Ch04.doc Homework Assignment #6 Due Date: 04/24/2020 Late Penalty: 10%/day +)(45%) Use of the if-elseif-else statements. Given the following function: lag) for 10 (30%) Use Octave to define a function called myFun01. The function myFun01 should take x as an argument and return y to the caller. b.(15%) Use the function you defined in Parta) to compute y using Octave for three different values of XX=-10, x=5,x= 10. You should not use any of the...
C# 1.)Using the following declaration: int [ , ] exampleArray = {{3, 5, 6, 7}, {2, 8, 9, 22}, {1, 0, 4, 11}}; ______________ would be displayed if the following output statement was executed. WriteLine(exampleArray.Rank); 2.)Using the following declaration: int [ , ] exampleArray = {{3, 5, 6, 7}, {2, 8, 9, 22}, {1, 0, 4, 11}}; ______________ would be displayed if the following output statement was executed. WriteLine(exampleArray[0, 2]); 3.) Using the following declaration: int [ , ] exampleArray...
Please code in MatLab or Octave
Output should match Sample Output in Second Picture
Thank you
5. In this problem we will investigate using the Secant Method to approximate a root of a function f(r). The Secant Method is an iterative approach that begins with initial guesses , and r2. Then, for n > 3, the Secant Method generates approximations of a root of f(z) as In-1-In-2 n=En-1-f (x,-1) f(Fn-1)-f(-2) any iteration, the absolute error in the approximation can be...
6. (6 points) Let f(x) = 3x and let g(x) be the function shown in Figure 1. Determine So f()g'(x)dx. Figure 1: Graph of g() 1.5 + 1 9(0) -0. 5 0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5 5.5 6 6.5 -0.5 +
i.) If the commands below will be executed in order, determine the output of the 4 echo commands (labeled as A-D): ( 2 Marks ) export z=3 e=10 echo $e - A bash echo $z -B k=4 sh Z=7 echo $k -C exit exit echo $z -D ii.) Given the contents of file (filename: /home/user5/research) below, write the single command line needed to perform the following tasks. SUMMARY GLOSSARY CHAPTER 1 Introduction and Research Approach Reach Obiective REFERENCES APPENDIX A...