Community Profile

photo

Justin Lavish


20 2018 이후 총 참여 횟수

Justin Lavish's 배지

  • Promoter
  • Solver

세부 정보 보기...

참여 게시물
보기 기준

해결됨


Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12

10달 전

해결됨


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

10달 전

해결됨


Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

11달 전

해결됨


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

11달 전

해결됨


Obscured by Earth
Given two points in <http://en.wikipedia.org/wiki/Earth-centered_inertial ECI> reference frame, check wheather they are in line-...

12달 전

해결됨


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

12달 전

해결됨


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

12달 전

해결됨


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

약 1년 전

해결됨


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

약 1년 전

해결됨


Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

약 1년 전

해결됨


Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

약 1년 전

해결됨


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

약 1년 전

해결됨


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

약 1년 전

해결됨


Bernoulli's Equation
Bernoulli's equation states that for an incompressible fluid the following summation is constant across the flow: v^2/2 + g*z + ...

약 1년 전

해결됨


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

약 1년 전

해결됨


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; and ...

약 1년 전

해결됨


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

약 1년 전

해결됨


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

약 1년 전

해결됨


Kepler's Equation
Solve <http://en.wikipedia.org/wiki/Kepler's_equation Kepler's Equation>. Note that the solution is rounded down to 5 decima...

약 1년 전

해결됨


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

약 1년 전