Question

How to multiply a matrix by a scalar values in MatLab? for example X = [234...

How to multiply a matrix by a scalar values in MatLab? for example X = [234 75 98 39; 91 186 101 116; 149 136 39 119; 95 175 126 39]. Multiply each row by a different scalar e.g 2, 3, 6, 4 respectively.

Homework Answers

Answer #1

This involves concepts of simple matrix multiplication, which is:

If we multiply a diagonal matrix with another matrix A, then the matrix A each row is multiplied by the element present in that row of the diagonal matrix. (Take some example and solve it yourself to observe the explanation.)

Here is the MATLAB code:

X = [234 75 98 39; 91 186 101 116; 149 136 39 119; 95 175 126 39]

Y = diag([2 3 6 4])*X % output -> diagonal matrix is created by the required scalars and multiplied by X

Output:

Y =

468 150 196 78
273 558 303 348
894 816 234 714
380 700 504 156

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
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at...
Refer to the accompanying data set of mean​ drive-through service times at dinner in seconds at two fast-food restaurants. Construct a 95​% confidence interval estimate of the mean​ drive-through service time for Restaurant X at​ dinner; then do the same for Restaurant Y. Compare the results. Restaurant X Restaurant Y 85 85 116 116 118 118 146 146 270 270 100 100 124 124 156 156 118 118 176 176 184 184 125 125 154 154 166 166 211 211...
Refer to the accompanying data set of mean drive-through service times at dinner in seconds at...
Refer to the accompanying data set of mean drive-through service times at dinner in seconds at two fast food restaurants. Construct a 99% confidence interval estimate of the mean drive-through service time for restaurant X at dinner then do the same for restaurant Y Restaurant X Restaurant Y 83 101 119 131 116 155 143 111 263 174 178 135 122 111 154 123 166 128 215 128 328 131 303 136 179 230 109 217 154 296 149 126...
Open Three Hospitals data. SETUP: It is believed that the number of injuries recorded in hospital...
Open Three Hospitals data. SETUP: It is believed that the number of injuries recorded in hospital 1 is different from the number of injuries recorded in hospital 2. Given the data your job is to confirm or disprove this assertion. 10. What test/procedure did you perform? (4 points) a. Regression b. Two sided t-test c. One sided t-test d. Confidence Interval 11. What is the statistical interpretation? (4 points) a. Average of data is inconsistent with the claim b. P-value...
A loan made on March 14 is due September 13 of the following year. Find the...
A loan made on March 14 is due September 13 of the following year. Find the exact time for the loan in a​ non-leap year and a leap year. days. The exact time in a​ non-leap year is ? days The exact time in a leap year is ? days. Data Table Sequential Numbers for Dates of the Year Day of Month Jan. Feb. Mar. Apr. May June July Aug. Sept. Oct. Nov. Dec. 1 1 32 60 91 121...
Pat.# Before After 1 195 125 To the left is 2 datasets measured for a sample...
Pat.# Before After 1 195 125 To the left is 2 datasets measured for a sample of 107 patients with the high cholesterol level before and after taking medication. Obtain the following for both sets: 2 208 164 3 254 152 1- the mean, mode and median 4 226 144 5 290 212 2- the variance and standard deviation 6 239 171 7 216 164 3- First, second and third quartiles 8 286 200 9 243 190 10 217 130...
Many standard statistical methods that you will study in Part II of this book are intended...
Many standard statistical methods that you will study in Part II of this book are intended for use with distributions that are symmetric and have no outliers. These methods start with the mean and standard deviation, x and s. For example, standard methods would typically be used for the IQ and GPA data here data215.dat. (a) Find x and s for the IQ data. (Round your answers to two decimal places.) s= Here are the numbers obs gpa iq gender...
I am making a game like Rock Paper Scissors called fire water stick where the rules...
I am making a game like Rock Paper Scissors called fire water stick where the rules are Stick beats Water by floating on top of it Water beats Fire by putting it out Fire beats Stick by burning it The TODOS are as follows: TODO 1: Declare the instance variables of the class. Instance variables are private variables that keep the state of the game. The recommended instance variables are: 1. 2. 3. 4. 5. 6. A variable, “rand” that...
The Red Lobster Restaurant chain conducts regular surveys of its customers to monitor the performance of...
The Red Lobster Restaurant chain conducts regular surveys of its customers to monitor the performance of individual restaurants. One of the questions asks customers to rate the overall quality of their last visit. the listed responses are Poor 1, Fair 2, Good 3, Very Good 4, and Excellent 5. The survey also asks respondents whether their children accompanied them (1=yes) and (2=no). Graphically depict these data and describe your findings. Customer Rate Children 1 4 1 2 3 2 3...
Researchers in a 2015 study by Flannery et al. sought to estimate the effectiveness of the...
Researchers in a 2015 study by Flannery et al. sought to estimate the effectiveness of the seasonal influenza vaccine in preventing acute respiratory infection (ARI). A total of 507 subjects from Texas who showed symptoms of ARI were recruited for this study. The data provided show the result of each subject's test for influenza. Click to download the data in your preferred format.    CrunchIt!    CSV    Excel    JMP    Mac-Text    Minitab    PC-Text    R   ...
Write an append function void append(const arrayListType<elemType>& otherList) that will take an array list as a...
Write an append function void append(const arrayListType<elemType>& otherList) that will take an array list as a parameter and append it to the current list. Write an operator+ function that will create a new list containing the contents of the two lists added. arrayListType<elemType> operator+(const arrayListType<elemType> & rhs) const so that you can write code like a = b + c where a b and c are all arrayListTypes. Add your functions to the template and write a main program to...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT
Active Questions
  • The Huntington Boys and Girls Club is conducting a fundraiser by selling chili dinners to go....
    asked 3 minutes ago
  • 2. Please determinate the correctness of the following statements and justify your answers (preferably by examples)....
    asked 8 minutes ago
  • Explain the various methods of intelligence collection, specifically human intelligence and signals intelligence.
    asked 11 minutes ago
  • The provided file has syntax and/or logical errors. Determine the problem and fix the program. using...
    asked 14 minutes ago
  • What new items will you need to replace a failing processor? Select all that apply.   ...
    asked 33 minutes ago
  • A system is to be developed for an airport. When passengers have boarded an aircraft, a...
    asked 41 minutes ago
  • After reading Module 5 PowerPoint 1 - The Philosophy of Human Existance and Health Care Policy,...
    asked 49 minutes ago
  • 1. Do you feel play has a place in supporting literacy development in early childhood? Explain...
    asked 53 minutes ago
  • How should roles be selected for the Emergency Operations Center (EOC)?  Is seniority less important than experience?...
    asked 1 hour ago
  • Discuss routing issues and solutions namely, count-to-infinity, split horizon, split horizon with poison reverse, and hold-down...
    asked 1 hour ago
  • Find an optimal parenthesization of a matrix-chain product whose sequence of dimensions is〈5,10,3,12,5,50,6〉.
    asked 1 hour ago
  • Water at 60 F (density=62.4lbm/ft^3 and dynamic viscosity = 7.5x10^-4 lbm/ft-s) is to be pumped through...
    asked 1 hour ago