A résolu


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

plus d'un an il y a

A résolu


Delete 2nd and 5th column of Given 6*6 matrix
Delete the 2nd and 5th columns of the given 6*6 matrix. Example Suppose A = magic(6) 35 1 6 26 19 ...

plus d'un an il y a

A résolu


Kelvin to Celsius
Degrees Celsius = degrees Kelvin - 273.15. Given a temperature in Kelvin, return the equivalent temperature in Celsius.

plus d'un an il y a

A résolu


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

plus d'un an il y a

A résolu


Matrix to column conversion
Given a matrix of any size, convert it into a column vector. e.g A=[10 20 30; 40 50 60] then, B = [10; 40; ...

plus d'un an il y a

A résolu


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

plus d'un an il y a

A résolu


Back to basics 8 - Matrix Diagonals
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector of numbers, output a square array with the...

plus d'un an il y a

A résolu


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

plus d'un an il y a

A résolu


Nth root of a number
Given an input and a number N, find the Nth root of the number(s)

plus d'un an il y a

A résolu


Change the sign of even index entries of the reversed vector
change the signs of the even index entries of the reversed vector example 1 vec = [4 -1 -2 9] ans = [9 2 -1 -4] example2...

plus d'un an il y a

A résolu


Vector Multiplication
Vector Multiplication of three matrix as shown in test cases.

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

plus d'un an il y a

A résolu


first element of matrix
find the first elements of a column matrix

plus d'un an il y a

A résolu


Remove the first, third and fifth rows of a matrix
Given a matrix x with at least five rows, return a matrix y that includes all rows of x except for th 1st, the 3rd and 5th. E...

plus d'un an il y a

A résolu


Repeat Vector Values an Arbitrary Number of Times
Given two vectors of the same size, repeat the values of the first vector the number of times given in a second vector. For exam...

plus d'un an il y a

A résolu


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

plus d'un an il y a

A résolu


Funny problems
Generate the following vector: if n=1 then q=1; elseif n=2 then q=[2 2 1]; elseif n=3 then q=[3 3 3 2 2 1]; ... end

plus d'un an il y a

A résolu


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

plus d'un an il y a

A résolu


Return median of a matrix
Compute median of a matrix of any dimension. Exclude the NaNs if any.

plus d'un an il y a

A résolu


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

plus d'un an il y a

A résolu


Speed of car
Calculate the Speed of car given its Distance travelled and time taken in x and y respectively

plus d'un an il y a

A résolu


Do Fast Fourier Transformation
Example Fast Fourier Transformation from vector [2,1]) ans = 3 1

plus d'un an il y a

A résolu


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

plus d'un an il y a

A résolu


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

plus d'un an il y a

A résolu


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

plus d'un an il y a

A résolu


N-plicate me
Modified version of duplicate and triplicate me. Repeat elements of input vector with given input n Ex: input = [1 2 3 4 5...

plus d'un an il y a

A résolu


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

plus d'un an il y a

A résolu


Is it prime?
Given a number, check whether it is prime or not. If prime output is true, otherwise false.

plus d'un an il y a

A résolu


Min of a Matrix
Return the minimum value in the given matrix.

plus d'un an il y a

Charger plus