Resuelto


Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

4 meses hace

Resuelto


Symmetric matrix
You must create a n-by-n symmetric matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : A = ...

4 meses hace

Resuelto


Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

4 meses hace

Resuelto


matlab indian players
answer is one of the indian matlab player(just for fun dont take serious)

4 meses hace

Resuelto


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

4 meses hace

Resuelto


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

4 meses hace

Resuelto


Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

4 meses hace

Resuelto


Basic Mathematics 6
A High School is trying to build their robot to be able to reach the hanging object which is H inches from the ground. Their ro...

4 meses hace

Resuelto


Linear Motion 6
An experimental vehicle traveling at v1 m/s is brought to a full stop in t seconds. How far does it travel before stopping? Roun...

4 meses hace

Resuelto


Number of Circles in a Number
Given a number, return the number of closed 'circles' in the base 10 numerical representation. Note: the number 4 has no circ...

4 meses hace

Resuelto


Are you in XY plane?
Take a point P as an input position Vector (x,y,z). If you are in XY plane, return 1 as an output otherwise return 0. Example...

4 meses hace

Resuelto


Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

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

4 meses hace

Resuelto


ascii value
let input='a' output=97

4 meses hace

Resuelto


Matlab Basics II - Unit Conversion
Write a function that converts Kg to lbs, returns the answer to the nearest 1/100th of a pound

4 meses hace

Resuelto


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

4 meses hace

Resuelto


Matlab Basics - Logical Tests I
Write a script to test whether a year number is for a leap year or not. eg. x = 1884 output = 1 eg. x = 3 output = 0

4 meses hace

Resuelto


Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

4 meses hace

Resuelto


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument x to a precision of 0.0001 Hint: You may wish...

4 meses hace

Resuelto


Triangle of numbers
Create a matrix with the integers from 1 to |n| arranged in a triangular shape. Every row |i| of the matrix contains |i| inte...

4 meses hace

Resuelto


Find the rank of a matrix
Determine the rank of a matrix without using the MATLAB function of the same name.

4 meses hace

Resuelto


Find the position of first minimum value in an integer array with numbers
If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

4 meses hace

Resuelto


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

4 meses hace

Resuelto


Sum the real and imaginary parts of a complex number
Sum the real and imaginary parts of a complex number. Example c = 1+2i has the solution 1 + 2 = 3

4 meses hace

Resuelto


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

4 meses hace

Resuelto


Count number of words in string
Count number of words in string Examples 'hi', answer is 1 'hi hi', answer is 2 'I enjoy cody', answer is 3

4 meses hace

Resuelto


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

4 meses hace

Resuelto


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

4 meses hace

Resuelto


Vertical matrix sort
Given a matrix x with n rows and m columns, return a matrix y with 2n rows and m columns, such that every column in x is sorted ...

4 meses hace

Resuelto


Check to see if a Sudoku Puzzle is Solved
*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

4 meses hace

Cargar más