Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


transpose of matrix
Find the transpose of matrix.

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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.

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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.

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Resuelto


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

más de 9 años hace

Cargar más