Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


transpose of matrix
Find the transpose of matrix.

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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.

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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.

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Risolto


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

quasi 10 anni fa

Carica altro