Question

Download the Array.mat file and save it in your current MATLAB directory (make sure it is...

Download the Array.mat file and save it in your current MATLAB directory (make sure it is in the correct folder). At the command prompt, type >> load Array. Look in your workspace window. You should see a 1-d array called vector (1x12), and a 2-d array called matrix (10x5). All of the following problems refer to the arrays vector and matrix downloaded from the Array.mat file. Don’t change the values in vector or matrix unless prompted. If you do inadvertently change them, just re-run the command >> load Array to recover the original arrays. a) Give a single MATLAB command that will pull out rows 5, 6, and 7 out of the 2-d array, matrix and put them in another matrix called matrixA. Show both your command and the results here: b) Give a single MATLAB command that will pull out columns 2, 3, and 4 out of the 2-d array, matrix and put them in another matrix called matrixB. Show both your command and the results here: c) Give a single MATLAB command that will replace the values in rows 1 & 2 and columns 2 & 3 of matrixB with the following values: Show both your command and the results here:

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Code:

creating Array.mat file :

command window :

If you have any doubts feel free to comment in comment section.

DO VOTE(LIKE).

Add a comment
Know the answer?
Add Answer to:
Download the Array.mat file and save it in your current MATLAB directory (make sure it is...
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
  • cope the code please thanks Write a MATLAB code to obtain the following. Keep your code...

    cope the code please thanks Write a MATLAB code to obtain the following. Keep your code commented whenever required. Copy your source code and command widow outcomes and screen shots of any plots in your solution. Generate a matrix "A" as follow. A= 16 6 8 2 10 18 12 14 4 I. II. Divide the matrix A by 2 and store the result in a matrix B. Combine matrices A & B to obtain the following matrix C. Also...

  • I need a matlab code to answer the questions below ICE09B Make an Array Develop a...

    I need a matlab code to answer the questions below ICE09B Make an Array Develop a MATLAB code which will produce an array that looks like the following: 4 10 1. You must start with a blank array and build the array with a DNFL. You can NOT just load the array with an assignment statement. Hint: Use "addition" for your variables Square all values in the array 2. Blackboard will ask you for a screenshot of your properly working...

  • For the program described below, document your code well. Use descriptive identifier names. Use s...

    For the program described below, document your code well. Use descriptive identifier names. Use spaces and indentation to improve readability. Include a beginning comment block as well as explanatory comments throughout. In the beginning comment block, add your name, program name, date written, program description. The description briefly describes what the program does. Include a comment at the beginning of each method to describe what the method does. Write a program to perform operations on square matrices (i.e. equal number...

  • For the program described below, document your code well. Use descriptive identifier names. Use spaces and...

    For the program described below, document your code well. Use descriptive identifier names. Use spaces and indentation to improve readability. Include a beginning comment block as well as explanatory comments throughout. In the beginning comment block, add your name, program name, date written, program description. The description briefly describes what the program does. Include a comment at the beginning of each method to describe what the method does. Write a program to perform operations on square matrices (i.e. equal number...

  • Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture...

    Nay programming languge is fine (MatLab, Octave, etc.) This is the whole document this last picture i sent is the first page 5. Write and save a function Sphere Area that accepts Radius as input argument, and returns SurfaceArea (4 tt r) as output argument. Paste the function code below. Paste code here 6. Validate your Sphere Area function from the command line, checking the results against hand calculations. Paste the command line code and results below. 7. Design an...

  • There is a file called mat2.txt in our files area under the Assignments folder. Download it...

    There is a file called mat2.txt in our files area under the Assignments folder. Download it and save it in the same folder where this Matlab file (HW08_02.m) is saved. It may be worth opening that text file to see how it is set out. Note well, however, that the file might have a different number of lines and different number of numbers on each line. Write a Matlab program that does the following: Prompt the user for an input...

  • QUESTION 42 In Matlab, all arrays start at position zero. O True O False QUESTION 43...

    QUESTION 42 In Matlab, all arrays start at position zero. O True O False QUESTION 43 In C, the expression x=2 is used to compare if the value of x is equal to the value of 2, and the expression x==2 is used to assign the value of 2 to x. O True O False QUESTION 44 What is the C and Matlab function used to open an input file? Hint: This is a single word. Spelling and syntax must...

  • Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called ...

    help wanted? Introduction to Engineering I Spring 2019 MATLAB Homework Assignment 1 a) Create a matrix called d from the third column of matrix a. (Hint, typing d 22: 5: 821 b) Combine matrix b and matrix d to create matrix e, a two-dimensional matrix with three rows c) Combine matrix b and matrix d to create matrix f, a one-dimensional matrix with six rows and d) Create matrix g from matrix a and the first three element of matrix...

  • second picture is output of the mathlab code Important Note: For testing of this part of the assignment, the automatic printing of values in the com mand window must not be used. Please make sure...

    second picture is output of the mathlab code Important Note: For testing of this part of the assignment, the automatic printing of values in the com mand window must not be used. Please make sure you put semicolon ω at the end of each line. For this part your program should perform following tasks 1. Create a Matrix A. Show the contents of matrix A to command window with the title Matrix A:". The Matrix A should be defined as...

  • Use basic java for this after importing PrintWriter object You will make a simple Magic Square...

    Use basic java for this after importing PrintWriter object You will make a simple Magic Square program for this Java Programming Assignment. Carefully read all the instructions before beginning to code. It is also required to turn in your pseudocode or a flowchart along with this program. Here are the instructions: At the beginning of the program, briefly describe to the user what a Magic Square Matrix is (described further on), and then allow them to enter “start” to begin...

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