Solved


Make a checkerboard matrix (★★★★★)
(copy of Prob. 4) Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1...

alrededor de 2 meses ago

Solved


Times 9
Try out this test problem first. Given the variable x as your input, multiply it by nine and put the result in y. Examples...

alrededor de 2 meses ago

Solved


Times 8
Try out this test problem first. Given the variable x as your input, multiply it by eight and put the result in y. Example...

alrededor de 2 meses ago

Solved


Times 7
Try out this test problem first. Given the variable x as your input, multiply it by seven and put the result in y. Example...

alrededor de 2 meses ago

Solved


Times 6
Try out this test problem first. Given the variable x as your input, multiply it by six and put the result in y. Examples:...

alrededor de 2 meses ago

Solved


Times 3
Try out this test problem first. Given the variable x as your input, multiply it by three and put the result in y. Example...

alrededor de 2 meses ago

Solved


Times 20
Try out this test problem first. Given the variable x as your input, multiply it by ninety and put the result in y. Exampl...

alrededor de 2 meses ago

Solved


Times 12
Try out this test problem first. Given the variable x as your input, multiply it by twelve and put the result in y. Exampl...

alrededor de 2 meses ago

Solved


Times 11
Try out this test problem first. Given the variable x as your input, multiply it by eleven and put the result in y. Exampl...

alrededor de 2 meses ago

Solved


Times 10
Try out this test problem first. Given the variable x as your input, multiply it by ten and put the result in y. Examples:...

alrededor de 2 meses ago

Solved


*Prime number check 2 (in construction)
Another way to see if a number is prime is to count the number of factors. For example, the number 4 has 2 factors, [ 2 4 ]...

alrededor de 2 meses ago

Solved


Median computation (★★★)
See easy edition of this problem. However, now you must compute the median of any real-valued vector without using the in-built...

alrededor de 2 meses ago

Solved


Median computation (★)
Given a vector of values, compute the median. The median is defined as the middle value in a set of *sorted* data. Thus, if ...

alrededor de 2 meses 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...

alrededor de 2 meses ago

Solved


Column Removal (★★★)
(copy of prob 7) Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2...

alrededor de 2 meses ago

Solved


Replicate elements in vectors (★★★)
(copy of Prob 867) Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2...

alrededor de 2 meses ago

Solved


Matrix indexing with two vectors of indices (★★)
(copy of Prob 589) Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)). Thus, if...

alrededor de 2 meses ago

Solved


Volume of Equilateral Triangle Prism
Find volume of equilateral triangle prism x = side of triangle l = length of prism

alrededor de 2 meses ago

Solved


Generate a vector which contains a pyramid pattern (★★★★)
Generate a vector that contains terms that follows a pyramid pattern up to the nth row: 1 2 2 3 3 3 4 4 4 4 ...

alrededor de 2 meses ago

Solved


Variance computation (★)
Given a vector x with several values, compute the variance, whose formula is given by: <<https://i.imgur.com/Wg95KBE.gif>> ...

alrededor de 2 meses ago

Solved


Mo money, mo math #2! (★★★)
(adapted from Prob 9 Cody team) You have a matrix for which each row is a person and the columns represent the number of quar...

alrededor de 2 meses ago

Solved


Mo money, mo math 1! (★★★)
(adapted from Prob 9 Cody team) You have a vector where the elements represent the number of $20 bills, $10 bills, $5 bills, ...

alrededor de 2 meses ago

Solved


Magnitude of a vector (★★★)
Given a vector x with values [ x1, x2, x3, ..., xn ], compute the magnitude (or length) of the vector which is given by <<htt...

alrededor de 2 meses ago

Solved


Sum of elements of a vector (★★★)
Given any vector x = [x1, x2, x3, ... xn], compute the sum of its elements. Thus, if x = [ 1 3 -2 5 ], then the sum of its el...

alrededor de 2 meses ago

Solved


Triangle Numbers (★★)
(copy of problem 5) Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3...

alrededor de 2 meses ago

Solved


Select every other element of a vector (★★)
(copy of prob 6) Write a function which returns every other element of the vector passed in. That is, it returns the all odd-...

alrededor de 2 meses ago

Solved


Doubling elements in a vector (★★)
(copy of prob. 1024) Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] t...

alrededor de 2 meses ago

Solved


Average of corner elements of a matrix (★★)
(copy of prob 2235) Calculate the average of corner elements of a matrix. e.g. x=[1 2 3; 4 5 6; 7 8 9;] avg = (1+3+7+9)...

alrededor de 2 meses ago

Solved


Remove the row average (★★★)
(copy of Prob. 963) Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solut...

alrededor de 2 meses ago

Solved


Which one is More bigger?
we have two input like (x,y) our output (z) must wich one is bigger input.

alrededor de 2 meses ago

Load more