Solved

Sum the rows

Sum the rows of the given matrix. Example x = [ 1 2 3 4 ] y = [ 3 7 ]

10 dagen ago

Solved

Create a function that gives a matrix like the following

x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

10 dagen ago

Solved

vectors counting by 5

Create a vector with numbers from x_min to x_max in increments of 5.

10 dagen ago

Solved

"Power matrix" of two vectors

Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

20 dagen ago

Solved

Sum of terms in a series 1 (★★★)

Given x and n, compute the following sum: |x|+|x|^(1/2)+|x|^(1/3)+|x|^(1/4)+|x|^(1/5) ... + |x|^(1/n) where ||x|| indica...

21 dagen ago

Solved

Zero

given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

22 dagen ago

Solved

Swap the first and last columns (★★)

(copy of Prob 19) Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becom...

22 dagen ago

Solved

Create a vector of n alternating ones and zeros (★★)

Given n, your output should be a vector y of numbers such that the first number is 1 and the numbers following it alternate betw...

22 dagen ago

Solved

Square Rooting a Number

This MATLAB Cody exercise requires you to take a number x, square root it, and get y

23 dagen ago

Solved

Average of even-numbered columns

Given a vector, find the average of even-numbered columns. e.g x = [ 4 6 8 9 1 2 7 ] y = ( 6 + 9 + 2 ) / 3

23 dagen ago

Solved

Even or Odd

Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...

23 dagen ago

Solved

Finding sum of even numbers in a vector.

Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

23 dagen ago

Solved

row removal

Remove the nth row from input matrix M and return the resulting matrix in output N.

23 dagen ago