Question

S.A vector IS givell by [5, 17,-3, 8, 0,-7, 12, 15, 20,-6, 6, 4,-7, 16]. Write a program as a 3 or 5, and, raises to the powe


6Write a program in a script file that creates an matrix with elements that have the following values. The value of each elem
0 0
Add a comment Improve this question Transcribed image text
Answer #1

clc clear alli M 7. Zeros Cn m) MCLD MCi11:n o1 dor 2(HCi-1)Hj-); _end end CSScanned with CamScanner

Add a comment
Know the answer?
Add Answer to:
S.A vector IS givell by [5, 17,-3, 8, 0,-7, 12, 15, 20,-6, 6, 4,-7, 16]. Write...
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
  • Question 1 a. Define the following matrices in a script file (M-file), ? = ( 8...

    Question 1 a. Define the following matrices in a script file (M-file), ? = ( 8 9 10 11; 23 9 16 15 ;11 12 3 6; 1 2 8 9 ) ? = ( 2 21 7 15; 12 4 8 22; 23 9 5 13; 23 4 21 22) ℎ = (4 9 12 15) b. Add suitable lines of codes to the M-file to do the following. Each of the following points should be coded in only...

  • Using Matlab Write a program which will: a. Accept two numbers from the user m and...

    Using Matlab Write a program which will: a. Accept two numbers from the user m and n b. Define an array with the dimensions a(n,m) and fill it with random numbers in the range of -100 to 100 inclusive. c. Provide the user the following menu from which he can select: 1. Sum of all elements in the array. Print the result. 2. Sum of the element in a row that he’ll specify. Print the result. 3. Sum of the...

  • Write a menu based program implementing the following functions: (0) Write a function called displayMenu that...

    Write a menu based program implementing the following functions: (0) Write a function called displayMenu that does not take any parameters, but returns an integer representing your user's menu choice. Your program's main function should only comprise of the following: a do/while loop with the displayMenu function call inside the loop body switch/case, or if/else if/ ... for handling the calls of the functions based on the menu choice selected in displayMenu. the do/while loop should always continue as long...

  • Program in C++! Thank you in advance! Write a menu based program implementing the following functions: (1) Write a funct...

    Program in C++! Thank you in advance! Write a menu based program implementing the following functions: (1) Write a function that prompts the user for the name of a file to output as a text file that will hold a two dimensional array of the long double data type. Have the user specify the number of rows and the number of columns for the two dimensional array. Have the user enter the values for each row and column element in...

  • Open a new file in your text editor, and start a class that will demonstrate a...

    Open a new file in your text editor, and start a class that will demonstrate a working two-dimensional array: import java.util.Scanner; class TwoDimensionalArrayDemo { public static void main(String[] args) { 2. Declare a three-by-three array of integers. By default, the elements will all be initialized to 0. int[][] count = new int[3][3]; 3. Declare a Scanner object for input, variables to hold a row and column, and a constant that can be used to indicate when the user wants to...

  • In Matlab A= 3 -5 6 ( 15 7 9 13 5 -4 12 10 2...

    In Matlab A= 3 -5 6 ( 15 7 9 13 5 -4 12 10 2 8 11 4 1 For the matrix A in problem-2, use MATLAB to carry out the following instructions a. Find the maximum and minimum values in each column. b. Find the maximum and minimum values in each row. c. Sort each column in ascending order and store the result in an array P. d. Sort each row in descending order and store the result...

  • write it in matlab language Question No 4 6 Marks The surface area and volume of...

    write it in matlab language Question No 4 6 Marks The surface area and volume of the shown ring-shaped mechanical part are calculated respectively as follows: A =rd (2k +d) V = *d? (2R +d) Write a user defined function that computes surface area (A) and volume (V) of this ring from the arguments d and R. Suppose that is constrained to be 15 in, greater than d. Write a script file that uses your function to plot A and...

  • //please help I can’t figure out how to print and can’t get the random numbers to...

    //please help I can’t figure out how to print and can’t get the random numbers to print. Please help, I have the prompt attached. Thanks import java.util.*; public class Test { /** Main method */ public static void main(String[] args) { double[][] matrix = getMatrix(); // Display the sum of each column for (int col = 0; col < matrix[0].length; col++) { System.out.println( "Sum " + col + " is " + sumColumn(matrix, col)); } } /** getMatrix initializes an...

  • Solve in MATLAB Problem 3: Given the vector x- [2 1 0 6 2 3 5...

    Solve in MATLAB Problem 3: Given the vector x- [2 1 0 6 2 3 5 3 4 1 3 2 10 12 4 2 7 9 2 4 51 use a for loop to (a) Add up the values of all elements in x (b) Compute the cumulative sum, y, of elements in x You can check your results using the built-in functions sum and cumsum. Q.5 What is the value of the sum of elements in vector x?...

  • 4-6 on matlab 4. Write a program in a script file that determines the real roots...

    4-6 on matlab 4. Write a program in a script file that determines the real roots of a quadratic equation ax2+bx+c 0 When the file runs, it asks the user to enter the values of the constants a, b, and c. To calculate the roots of the equation the program calculates the discriminant D, given by: D b2-4ac When D 0, the program displays message "The equation has two roots," and the roots are displayed in the next line. When...

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