Solved


02 - Vector Variables 4
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2d.png>> (Logarithmically spaced numbers between 1 and 1...

8 years ago

Solved


03 - Matrix Variables 5
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3e.png>>

8 years ago

Solved


02 - Vector Variables 5
_eVec_ = _Hello_ ( _eVec_ is a string, which is a vector of characters )

8 years ago

Solved


03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

8 years ago

Solved


03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

8 years ago

Solved


Removing rows from a matrix is easy - but what about inserting rows?
Assume A is a 5-by-5 matrix. A([2,4],:) = [] is a quick way to remove rows 2 and 4. Can you find a quick way to insert rows into...

8 years ago

Solved


Determine the number of correct and incorrect answers
In a Multiple Choice Question Test, you are to sort out answer from 4 samples, one of them is correct answer. There are 50 quest...

8 years ago

Solved


Adding Numbers
Add the input numbers to the original.

8 years ago

Solved


Find the missing numbers.
Total *N* numbers are in the series of natural numbers ( *1,2,3,...,N* ). The input is an array (unsorted) of those natural num...

8 years ago

Solved


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

8 years ago

Solved


ASCII sum of phrases
Find the sum of the numeric equivalents of all characters entered in a phrase. For example: for the phrase 'My name is test', th...

8 years ago

Solved


Calculating the total earnings of a factory
The row vector, prods contains the number of various products manufactured per hour. The second row vector, prices holds values ...

8 years ago

Solved


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

8 years ago

Solved


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

8 years ago

Solved


Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

8 years ago

Solved


subtraction of two nos
given a and b, subtract and give the answer

8 years ago

Solved


Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...

8 years ago

Problem


"Percentages may not total 100 due to rounding"
*Percentages* are commonly *rounded* when presented in tables. As a result, the sum of the individual numbers does not always a...

8 years ago | 0 | 3 solvers

Solved


Permute diagonal and antidiagonal
Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

8 years ago

Solved


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

8 years ago

Solved


Find the outlier in a set of samples
Given an array x of numbers. Assumed that this array has one outlier. Find the position p and the value v of the outlier in this...

8 years ago

Solved


Find the mean of a 2-D matrix after excluding elements of specified sub-matrix
You need to find the mean of a 2-D matrix after excluding elements which form an inner sub-matrix. e.g. If the input 2-D matrix ...

8 years ago

Solved


Check if any duplicates in your data
Given an array x, return a number n equal to the largest number of repetitions in your data. For example: If x=[1 2 3 6 8 4 9]...

8 years ago

Solved


How many problems and solutions did you like?
When I started to create problems in my early stages of playing Cody, one day, I realized that Aurelien Queffurust liked one of ...

8 years ago

Solved


Find left eigenvector of row stochastic matrix
Find the left eigenvector of the given stochastic matrix P that has eigenvalue 1. Normalize the vector so the sum of the entri...

8 years ago

Solved


Find the starting index of a consecutive condition
Given a logical vector |v|, and a positive integer |n|, return the smallest index |i| that satisfies: all( v(i : i+n-1) ) =...

8 years ago

Solved


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to the set S of natural numbers up to N. B is a vector...

8 years ago

Solved


Given two strings, find the maximum overlap
Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

8 years ago

Solved


Count from 0 to N^M in base N.
Return an array of numbers which (effectively) count from 0 to N^M-1 in base N. The result should be returned in a matrix, with ...

8 years ago

Solved


Reverse a matrix
Its simple. You have to reverse a given matrix.

8 years ago

Load more