Community Profile

# Klap Hest

363 total contributions since 2019

View details...

Contributions in
View by

Solved

Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

27 jours ago

Solved

expand intervals
You're given a row vector of an even number of monotonically increasing integers. Each pair of consecutive integers is the lower...

27 jours ago

Solved

Basics: 'Find the eigenvalues of given matrix
Find the eigenvalues y for a given matrix x.

28 jours ago

Solved

Returning a "greater than" vector
Given a vector, v, return a new vector , vNew, containing only values > n. For example: v=[1 2 3 4 5 6] n=3 vNew =...

28 jours ago

Solved

Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

28 jours ago

Solved

Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

28 jours ago

Solved

Find common elements in matrix rows
Given a matrix, find all elements that exist in every row. For example, given A = 1 2 3 5 9 2 5 9 3 2 5 9 ...

28 jours ago

Solved

middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

environ un mois ago

Solved

Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

environ un mois ago

Solved

matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

environ un mois ago

Solved

Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

environ un mois ago

Solved

Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

environ un mois ago

Solved

Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

environ un mois ago

Solved

Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

environ un mois ago

Solved

Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

environ un mois ago

Solved

Getting the indices from a matrice
Getting the indices from a matrice. Inspired by Problem 645. Getting the indices from a vector by the great Doug Hull. Given a...

environ un mois ago

Solved

intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

environ un mois ago

Solved

Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

environ 2 mois ago

Solved

sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

environ 2 mois ago

Solved

Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

environ 2 mois ago

Solved

Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

environ 2 mois ago

Solved

Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

environ 2 mois ago

Solved

Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

environ 2 mois ago

Solved

Calculate the sum of two numbers. Example input = [2 3] output = 5

environ 2 mois ago

Solved

Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

environ 2 mois ago

Solved

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

environ 2 mois ago

Solved

Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...

environ 2 mois ago

Solved

Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

environ 2 mois ago

Solved

Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

environ 2 mois ago

Solved

Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

environ 2 mois ago