Question

Make a 10x10 array of zeros using the zeros function. Then, change the array to look...

Make a 10x10 array of zeros using the zeros function. Then, change the array to look like the array below:

2 2 2 2 2 2 2 2 2 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
1 0 0 0 0 0 0 0 0 3
4 4 4 4 4 4 4 4 4 4

Use MATLAB

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

m = zeros(10, 10);
m(:, 1) = ones([10, 1]);
m(1, :) = 2*ones([1, 10]);
m(:, 10) = 3*ones([10, 1]);
m(10, :) = 4*ones([1, 10]);

m


Add a comment
Know the answer?
Add Answer to:
Make a 10x10 array of zeros using the zeros function. Then, change the array to look...
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
  • For the following systems, find the transfer function using MATLAB. Also, determine the poles and zeros...

    For the following systems, find the transfer function using MATLAB. Also, determine the poles and zeros of each transfer. You should be able to use some combination of the following MATLAB functions: 'ss2tf( )', 'ss( )', 'tf( )', 'pole( )', "zero( )', and 'roots() 100 ).y) = [0_1)|) 2 a. |x2(t)] -10 [x1 (t lx20 21 b. + 01 x1 (t) 0 x2(t) 1 u(t), y(t): ol]x3(t)] [(t)] x2(t) 3(t) [x1 (t)] [o 0 1x2(t) [x3(t)] -4 -2 0 2...

  • write a function that use to change the char in an array. The function should accept...

    write a function that use to change the char in an array. The function should accept three arrays: main array(the array has value that needs to be change); replace array(the array that store the array of charaters that need to be replace.); with array(the array store the new value that replace the old one); The function should look like this: Change(char array[], char rep[], char with[]). example: Change("abc", "afd","gdh") . Than the array should become "gbc". (The last two arguments...

  • 3. Create a MATLAB script or function that takes converts a 10-element array, B, of zeros...

    3. Create a MATLAB script or function that takes converts a 10-element array, B, of zeros and ones and converts it into a floating point number, F, using the following rules: 1. The leading bit indicates a positive (0) or negative (1) number ii. Bits 2 through 4 are the binary representation of e, the exponent Ill Bits 5 through 10 represent the number precision as: (sign).(1 + bit5.2-1 + bith. 2-2 + ... + bit10.2-6). 2-3 iv. Finally, if...

  • 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...

  • using C++ only. The findFirstZero function is supposed to find the first element in an array...

    using C++ only. The findFirstZero function is supposed to find the first element in an array whose value is zero, and sets the parameter  p to point to that element, so the caller can know the location of that element holding the value zero. Explain why this function won't do that, and show how to fix it. Your fix must be to the function only; you must not change the  main routine below in any way. As a result of your fixing...

  • ​​​​​​​in C++ Q5-pointers: Using pointer notation and dynamic array to: input m*n array of zeros and...

    ​​​​​​​in C++ Q5-pointers: Using pointer notation and dynamic array to: input m*n array of zeros and ones then write the following functions: 1- even parity row: to find the even parity of each row 2- even Rarity.col; to find the even parity of each col. 3- print array: to print the new array (n+1)*(m+1)

  • In matlab, there is a function "size" that accepts an array as a parameter (or input...

    In matlab, there is a function "size" that accepts an array as a parameter (or input argument) and returns the dimensions of that array as another single-dimension array.      For example, if the array were 2 x 2, it would return [2 2]. Assume that input1 is a 1 or 2-dimensional array. Use the size function to obtain the dimensions and save the output into the return argument of this function "output1"     1Do not modify the line below 2-unction...

  • I need help making my array into a function that can called by the main function...

    I need help making my array into a function that can called by the main function using my program. This is C programming int prime (int x) { int i; i = 2; while (i < x) { if (x % i == 0) return 0; i++; } return 1; } int main (void){ int n; scanf ("%d", &n); if (n < 1) { printf ("Error: at least one data value must be provided.\n"); return 1; } int a[n]; int...

  • (a) Find the rational zeros and then the other zeros of the polynomial function f(x) =...

    (a) Find the rational zeros and then the other zeros of the polynomial function f(x) = x + 5x2 - 2x - 10, that is, solve f(x) = 0, (b) Factor f(x) into linear factors (a) Select the correct choice below and fill in any answer box(es) within your choice (Use a comma to separate answers as needed) O A. There are only rational zeros and they are OB. There is only one rational zero, and the other zeros are...

  • + (a) Find the rational zeros and then the other zeros of the polynomial function f(x)...

    + (a) Find the rational zeros and then the other zeros of the polynomial function f(x) = 3x3. - 7x2 + 147x + 343, that is, solve f(x) = 0. (b) Factor f(x) into linear factors. (a) Select the correct choice below and fill in any answer box(es) within your choice. (Type an exact answer, using radicals and i as needed. Use integers or fractions for any numbers in the expression. Use a comma to separate answers as needed.) A....

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