Question

Create a matrix 4x4 of integer random numbers between 1 and 50, and perform the following...

Create a matrix 4x4 of integer random numbers between 1 and 50, and perform the following operations: a. Generate a (1x3) matrix of the original b. Generate a (4x2) matrix of the original with the row order reversed c. Replace the second column of the matrix with [4; 8 ; 16; -2] ( MATLAB)

Homework Answers

Answer #1

Please find the answer below.
Please do comments in case of any issue. Also, don't forget to rate the question. Thank You So Much.

clc
clear
%generate random matrix
randMatrix = randi(50,4)

%generate one*three
oneCrossThree = randMatrix(1,1:3)

%generate one*three
fourCrossTwo=randMatrix(4:-1:1,1:2)
randMatrix(1:4,2) = [4; 8 ; 16; -2];
randMatrix

Know the answer?
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
Similar Questions
Generate a 4 x 4 random integer matrix, save it in the variable mat and perform...
Generate a 4 x 4 random integer matrix, save it in the variable mat and perform the following: ( MATLAB) Generate a matrix from the matrix mat that is composed of row 2, row 1 and row 3 of mat Generate a matrix from the matrix mat that is composed on column 2 and 3 of mat Generate a matrix from the matrix mat that starts with column 2 and row 3 and contains all the elements till the end.
Generate 1000 random numbers between 0 and 1*Create a frequency table with the following Generate 1000...
Generate 1000 random numbers between 0 and 1*Create a frequency table with the following Generate 1000 random numbers between 0 and 1*Create a frequency table with the following bins 0, 0,1, 0.2, ..., 0.8, 0.9 , 1Find the expected value bins 0, 0,1, 0.2, ..., 0.8, 0.9 , 1Find the expected value
Lottery The lottery game matches three different integer numbers between 1 and 10. Winning depends on...
Lottery The lottery game matches three different integer numbers between 1 and 10. Winning depends on how many matching numbers are provided by a player. The player provides three different integers between 1 and 10. If there is a match of all 3 numbers, the winning $ 1000. If there is a match with 2 numbers, the winning $ 10. If there is a match with 1 number, the winning $ 1. With no match, the winning is $0. Write...
Write a PHP code that: 1- Creates an array that holds 10 random integer numbers between...
Write a PHP code that: 1- Creates an array that holds 10 random integer numbers between 1 and 100. 2- Moves all multiple of 3-numbers in the array that created in part-a into a new array. 3- Moves all multiple of 5-numbers in the array that created in part-a into a new array. 4- Find the maximum and the minimum multiple of 3-numbers, if exist. 5- Find the maximum and the minimum multiple of 5-numbers, if exist. 6- Prints the...
1.) Generate an array of 10 random numbers between 1 - 100 2.) Copy the array...
1.) Generate an array of 10 random numbers between 1 - 100 2.) Copy the array to a temp array 3.) Call each of the methods to sort (bubble, selection, insertion, quick, merge), passing it the array 4.) In-between the calls, you are going to refresh the array to the original numbers. 5.) Inside of each sorting method, you are going to obtain the nanoseconds time, before and after the method Subtract the before time from the after time to...
A large collection of​ one-digit random numbers should have about​ 50% odd and​ 50% even digits\...
A large collection of​ one-digit random numbers should have about​ 50% odd and​ 50% even digits\ because five of the ten digits are odd​ (1, 3,​ 5, 7, and​ 9) and five are even​ (0, 2,​ 4, 6, and​ 8).A. .Find the proportion of​ odd-numbered digits in the following lines from a random number table. Count carefully: 9 9 2 8 9 7 6 5 8 3 0 8 6 0 2 3 7 8 4 9 9 2 8...
1. Find the inverse of the 3 by 3 matrix : [123] [014] [560] by elementary...
1. Find the inverse of the 3 by 3 matrix : [123] [014] [560] by elementary row operations 2. A couple would like to invest $150,000 so that they can earn $8500 in interest in one year. One investment portfolio option suggest investing their money into two accounts. One account earns interest at 7.5% and the other earns interest at 5%. How much should be invested in each account? 3. Given the following maximum problem, set up the initial simplex...
1. Which of the following is NOT a type of data anomaly? a. Insertion b. Transformation...
1. Which of the following is NOT a type of data anomaly? a. Insertion b. Transformation c. Deletion d. Modification 2. Functional dependency has the following characteristics EXCEPT a. Attribute Y is functionally dependent upon attribute X, if the value of X uniquely determines the value of Y b. It's a constraint between two tables c. It's a constraint between two attributes (columns) d. Represented as Determinant(s) -> Dependent(s) 3. The definition of a partial dependency is a.One or more...
a) What is the difference between error and uncertainty? b) Table 1 shows sample of random...
a) What is the difference between error and uncertainty? b) Table 1 shows sample of random measurements of an experiment done in a lab. Table 1 X; X; - 2 3 4 5 6 0.98 1.07 0.86 1.16 0.96 0.68 1.34 1.04 1.21 0.86 11 12 13 14 15 16 17 18 19 20 1.02 1.26 1.08 1.02 0.94 1.11 0.99 0.78 1.06 0.96 8 9 10 Based on the data provided, answer the following question. i) Create a frequency...
If i have 50 randomly generated numbers and I want to apply the following forecasting techniques...
If i have 50 randomly generated numbers and I want to apply the following forecasting techniques on them; Simple moving average, Exponential smoothing and trend projection with regression, which would be the best technique between them and why will I choose this one? Week Demand 1 688 2 681 3 643 4 667 5 642 6 683 7 758 8 791 9 751 10 682 11 609 12 635 13 647 14 796 15 676 16 617 17 704 18...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT