Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


transpose of matrix
Find the transpose of matrix.

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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.

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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.

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Mehr laden