Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

11 months ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

11 months ago

Solved


Golden ratio
Calculate the golden ratio. Hint: phi^2 = phi + 1.

11 months ago

Solved


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

11 months ago

Solved


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

11 months ago

Solved


Matrix which contains the values of an other matrix A at the given locations.
If you have two matrices, which together give xc and yc coordinates into another matrix, eg : xc = [1 1 1; 2 2 1]; ...

11 months ago

Solved


07 - Common functions and indexing 3
Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

11 months ago

Solved


frame of the matrix
Given the matrix M, return M without the external frame.

11 months ago

Solved


Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

11 months ago

Solved


Sum of diagonals elements of a matrix
Given a matrix, return the sum of all the elements across the diagonals. E.g. A = [1 2 3; 4 5 6; 7 8 9;...

11 months ago

Solved


Find remainder when x is divided by 3
Find remainder when x is divided by 3

11 months ago

Solved


Matrix Max Finder
Output the maximum value in a matrix

11 months ago

Solved


Substring Extraction
In a given string, find the substring between Start_string and End_string. You will have to include or exclude the Start_str...

11 months ago

Solved


center of mass
R is a given matrix with size [n,2]. R(i,:) is interpreted as the 2D-position of a mass point with mass i. Calculate the center ...

11 months ago

Solved


Space Saver
Remove all characters that are below a space in ASCII value.

11 months ago

Solved


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

11 months ago

Solved


Values in Array
How many values are in the array

11 months ago

Solved


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

11 months ago

Solved


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

11 months ago

Solved


Rotate a matrix for 180 degree
Rotate a matrix for 180 degree for eg: x=[1 2 3 4] y=[4 3 2 1]

11 months ago

Solved


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

11 months ago

Solved


Area of square
Find the area of a square whose diagonal length is given as x.

11 months ago

Solved


Replace Nan!
Replace Nan in the given vector(v) with 9999.

11 months ago

Solved


count upper and lower case characters
In a given input string, count and return the number of upper and lower case characters as u and l respectively. For example:...

11 months ago

Solved


Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example start with x = 1 and y = 3 end with y = 1 and x = 3 Do NOT simply r...

11 months ago

Solved


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

11 months ago

Solved


Determine Whether an array is empty
Input a matrix x, output y is TRUE if x is empty, otherwise FALSE.

11 months ago

Solved


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

11 months ago

Solved


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

11 months ago

Solved


Vector of numbers divisible by 3
* Input(n) - any integer * Output(v) - vector with numbers divisible by 3(exept 0) starting from n to 0 Examples: * n=6...

11 months ago

Load more