Solved


GPA
Math's credit is 5 and you got x | Physics's credit 7 and you got y what is your GPA

ongeveer 4 jaar ago

Solved


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

ongeveer 4 jaar 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...

ongeveer 4 jaar 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 ...

ongeveer 4 jaar 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...

ongeveer 4 jaar ago

Solved


Get the elements of diagonal and antidiagonal for any m-by-n matrix (★★★★)
(copy of prob. 859) In this problem you must submit a solution which returns the diagonal and anti-diagonal elements without ...

ongeveer 4 jaar ago

Solved


Longest run of consecutive numbers (★★★★★)
(copy of Problem 672) Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you...

ongeveer 4 jaar ago

Solved


Reindex a vector (★★)
(copy of Prob. 676) You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX h...

ongeveer 4 jaar ago

Solved


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

ongeveer 4 jaar 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...

ongeveer 4 jaar 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)...

ongeveer 4 jaar ago

Solved


Compute the Bernoulli numbers
The <https://en.wikipedia.org/wiki/Bernoulli_number Bernoulli numbers> appear in several applications in number theory, includin...

ongeveer 4 jaar 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...

ongeveer 4 jaar 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-...

ongeveer 4 jaar 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...

ongeveer 4 jaar 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 ]...

ongeveer 4 jaar ago

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

ongeveer 4 jaar ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

ongeveer 4 jaar 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...

ongeveer 4 jaar 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...

ongeveer 4 jaar ago

Solved


Extract leading non-zero digit (★★★★★)
(Copy of Problem 47) Benford's Law states that the distribution of leading digits is not random. This is probably because man...

ongeveer 4 jaar 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...

ongeveer 4 jaar ago

Solved


How many points lie within the rectangle and how many aren't?
Suppose, you are given the coordinates of bottom-left and top-right corners of a rectangle as *input-1, R* i.e *R=[Bottom-left c...

ongeveer 4 jaar ago

Solved


Approximate functions 1 (★★★)
Compute the following sum for any given x and positive integer n. <<https://i.imgur.com/eUwXdSE.gif>> <> Here m! denote...

ongeveer 4 jaar ago

Solved


Function 1 (★)
Compute the value of <<https://i.imgur.com/AxKWLmE.gif>> for any given positive x.

ongeveer 4 jaar ago

Solved


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

ongeveer 4 jaar 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...

ongeveer 4 jaar ago

Solved


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

ongeveer 4 jaar 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...

ongeveer 4 jaar ago

Solved


Convert Angstrom to Meters
Write a code that converts the angstrom unit to meters.(A is angstrom and m is meters.)

ongeveer 4 jaar ago

Load more