Ask Computer Engineering Expert

Home Work 1:

1. Write the command that will create matrix A shown in the format below using colon operator for the first row,

2101_create matrix.jpg

2. Now write the command that will access and extract '4' from first row of 'A' and save it in 'B'

3. Write the command that will add 'B' with element at location (2,4) of 'A' and save the result in 'C'

4. Extract the row containing your K-Id and save into a new variable called 'kid'

5. What are the dimensions of 'kid'?

Hints for HW 2:

  • Use ':' operator to create the first row of A then switch to the next row using ';' and then define the numbers of your K-ID separating them using comma ',' or spaces eg. A=[m:n;1 2]
  • Find the row and column number in which '4' is location in A, then form the index pair to address that location eg. A(m,n) is the element in A on the mth row and nth column
  • Add number at location (2,4) of A to B eg. A(m,n)+B
  • Access all elements only in the 2nd row and extract them to 'kid' eg. A(1,:) will access 1strow
  • Write down the dimension of 'kid' eg. m x n which means m rows by n columns

Home Work 3:

1. Specify size/dimension of the matrix 'A' created in HW1.1. Also write the command that will find the size in MATLAB

2. Create an 'ones' matrix of the same size as 'A' and add it to 'A'. Save the result into 'D'

3. Now transpose 'D' and save it onto 'E'. What is the size of matrix 'E'?

4. Get a number from the user, save it in 'f' and subtract 10 from it. Save the result onto 'f'

5. Use the three basic display and printing statements to print the new value of 'f' consisting of following four phrases

"The value entered by the user was"

Value of f

". It was modified to"

Final value of f

Hints for HW 4:

  • Mention dimensions of matrix 'A' and verify it using MATLAB eg. [m n]=size(A)
  • Create an ones matrix using ones(m,n) and add it to 'A'
  • Use " ' " operator to transpose and find its size
  • Use input() to get number from user
  • Perform specified operation and use disp(), fprintf and sprint() to display the same statement

Computer Engineering, Engineering

  • Category:- Computer Engineering
  • Reference No.:- M91406961
  • Price:- $40

Priced at Now at $40, Verified Solution

Have any Question?


Related Questions in Computer Engineering

Does bmw have a guided missile corporate culture and

Does BMW have a guided missile corporate culture, and incubator corporate culture, a family corporate culture, or an Eiffel tower corporate culture?

Rebecca borrows 10000 at 18 compounded annually she pays

Rebecca borrows $10,000 at 18% compounded annually. She pays off the loan over a 5-year period with annual payments, starting at year 1. Each successive payment is $700 greater than the previous payment. (a) How much was ...

Jeff decides to start saving some money from this upcoming

Jeff decides to start saving some money from this upcoming month onwards. He decides to save only $500 at first, but each month he will increase the amount invested by $100. He will do it for 60 months (including the fir ...

Suppose you make 30 annual investments in a fund that pays

Suppose you make 30 annual investments in a fund that pays 6% compounded annually. If your first deposit is $7,500 and each successive deposit is 6% greater than the preceding deposit, how much will be in the fund immedi ...

Question -under what circumstances is it ethical if ever to

Question :- Under what circumstances is it ethical, if ever, to use consumer information in marketing research? Explain why you consider it ethical or unethical.

What are the differences between four types of economics

What are the differences between four types of economics evaluations and their differences with other two (budget impact analysis (BIA) and cost of illness (COI) studies)?

What type of economic system does norway have explain some

What type of economic system does Norway have? Explain some of the benefits of this system to the country and some of the drawbacks,

Among the who imf and wto which of these governmental

Among the WHO, IMF, and WTO, which of these governmental institutions do you feel has most profoundly shaped healthcare outcomes in low-income countries and why? Please support your reasons with examples and research/doc ...

A real estate developer will build two different types of

A real estate developer will build two different types of apartments in a residential area: one- bedroom apartments and two-bedroom apartments. In addition, the developer will build either a swimming pool or a tennis cou ...

Question what some of the reasons that evolutionary models

Question : What some of the reasons that evolutionary models are considered by many to be the best approach to software development. The response must be typed, single spaced, must be in times new roman font (size 12) an ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As