Solved


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

9 years ago

Solved


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. <http://en.wikipedia.org/wiki/Whole...

9 years ago

Solved


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

9 years ago

Solved


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

9 years ago

Solved


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

9 years ago

Solved


Divide by 4
Given the variable x as your input, divide it by 4 and put the result in y.

9 years ago

Solved


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

9 years ago

Solved


vector that contains the minimum of each row
Create a function which returns a vector that contains the minimum of each row.

9 years ago

Solved


minimum of a vector
Return the minimum value in the given vector.

9 years ago

Solved


matrix of zeros
Given n, create an n-by-n matrix of zeros.

9 years ago

Solved


transpose of matrix
Find the transpose of matrix.

9 years ago

Solved


fifth element of vector
Find the fifth element of any given column vector.

9 years ago

Solved


creating matrix of replicated elements
Given an input element a, and the dimensions, (m, n) return a matrix of size m-by-n filled with element a.

9 years ago

Solved


vectors counting by 5
Create a vector numbers from 55 to 115 in increments of 5.

9 years ago

Solved


matrix to vector
For given a matrix of any size, convert it into a column vector.

9 years ago

Solved


row removal
Remove the nth row from input matrix M and return the resulting matrix in output N.

9 years ago

Solved


mean
Calculate the mean of a given vector (with positive elements) and return them in a vector.

9 years ago

Solved


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

9 years ago

Solved


Will there be a new leader?
Simply answer the title.

9 years ago

Solved


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

9 years ago

Solved


Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...

9 years ago

Solved


Max of a Vector
Write a function to return the max of a vector

9 years ago

Solved


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

9 years ago

Solved


intervals
Write a function that takes an interval from a to b, and divides it into 6 parts.

9 years ago

Solved


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

9 years ago

Solved


find the surface area of a cube
given cube side length x, find the surface area of the cube, set it equal to y

9 years ago

Solved


length of a vector
Find twice the length of a given vector.

9 years ago

Solved


Replacing a row
For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

9 years ago

Solved


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

9 years ago

Solved


The rabbit problem
Someone discovered that rabbits reproduce at the rate of fibonnaci so you just input the number and it will print the fibonnaci ...

9 years ago

Load more