Solved


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

2 years ago

Solved


Sum of numbers from 1-100
Sum up every whole number from 1 to 100. Include 1 and 100 in your calculation.

2 years ago

Solved


Shift elements of vector left
Shift elements of vector to the left. For ex. : Input_vec = [1 2 3 4 5] Output_vec = [2 3 4 5 1]

2 years ago

Solved


Even or Odd
Write a function which can tell us if the given value x is odd or even. So if x is even return true and if x is odd return false...

2 years ago

Solved


Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix. examples: Input A=[1 2 3 5 6;52 58 56 45...

2 years ago

Solved


Determine whether the number is multiple of 3 or not
Let a=6 and as 6 = 2*3 which means 6 is multiple of 3; return true if a is multiple of 3,otherwise false.

2 years ago

Solved


Geometrical meaning of determinant
Given two vectors x,y, in 2D or three vectors x,y,z in 3D space, compute the area (or volume) of the parallelogram they define. ...

2 years ago

Solved


Find the diagonal of the square of side L
You are given a square of side length L, find D the length of its diagonal.

2 years ago

Solved


Values in Array
How many values are in the array

2 years ago

Solved


Dots in a Circle
Return how many integer grid points there are inside a circle of radius _r_ centred at (0,0) (including points on the edge). ...

2 years ago

Solved


Volume of a Simplex
Return the volume of a <http://en.wikipedia.org/wiki/Simplex regular _n_-simplex> with a unit side length. Results are up to...

2 years ago

Solved


Forward Elimination for Gauss Elimination
Perform forward elimination for a given pivot column in the augmented matrix, Ab=[A,b]

2 years ago

Solved


Usage of varargout
This Challenge is to demonstrate usage of varargout. Output a cell array using varargout of magic squares of size 1 thru n. ...

2 years ago

Solved


Center of mass
Given a matrix M(m,n), where m is the number of vertices of the geometrical element and n is 2 or 3 (2D-plane figure or 3D-solid...

2 years ago

Solved


possible ways through matrix
This problem is inspired from problem 2405 <https://www.mathworks.com/matlabcentral/cody/problems/2405-the-number-of-ways>. Che...

2 years ago

Solved


A row vector, pick 1st number, skip 1,pick 3rd number, skip 2,pick,skip,etc then place all picked numbers in order in new vector
Having a row vector of number, pick the first number, place in new output vector as the first value, then skip one number, pick...

2 years ago

Solved


Compute the maximal product of any two numbers whose concatenation is n
Write a function that takes an input and computes the maximal product of numbers that concatenate to . For example, if , then t...

2 years ago

Solved


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

2 years ago

Solved


Annual Salary
What is the annual salary of Mr. Cody if he works 40 hours a week and gets $x per hour and a yearly bonus of $2000? (Let, 50 wee...

2 years ago

Solved


MATLAB Basics: Complex Conjugates
For a given complex number, x, return the complex conjugate, y.

2 years ago

Solved


Count the primes in Collatz sequences
Several Cody problems (21, 69, 42937, 44448, 44784, 52422) involve Collatz sequences. These start with a seed . If is odd, the ...

2 years ago

Solved


Circle : Square

2 years ago

Solved


Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

2 years ago

Solved


lb to kilogram
convert lb to kilogram units, easy

2 years ago

Solved


Matrix to vector transformation
given a matrix, make in the output 1 column vector putting odd numbers in ascending order after that put the even numbers in des...

2 years ago

Solved


currency converter
given a rate of exchange calculate the equivalent units of 100 USD

2 years ago

Solved


remove every row&col for every nan
for a given matrix, remove the row and column of every nan. Example x=[1 2 NaN 4 5 6 7 8 ...

2 years ago

Solved


Ounces to Kilograms
convert ounces to kilograms, easy

2 years ago

Solved


Energy-Mass Equivalence
Given input enegy of the object, E, and constant c = 300,000,000, find the mass of the object.

2 years ago

Load more