Solved


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

9 months ago

Solved


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

9 months ago

Solved


Indirect Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

9 months ago

Solved


Divisible by 13
Write a function to determine if a number is divisible by 13. Similar to the number seven, this can be done by a few different m...

9 months ago

Solved


Divisible by 15
Write a function to determine if a number is divisible by 15. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

9 months ago

Solved


Divisible by 12
Write a function to determine if a number is divisible by 12. Similar to the number six, this can be done by checking for divisi...

9 months ago

Solved


Divisible by 11
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

9 months ago

Solved


Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

9 months ago

Solved


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

9 months ago

Solved


Convert binary numbers array into array of decimal numbers.
Convert binary numbers array into array of decimal numbers. Example x=[ 11001000 ; 11001001 ; 11001010 ; 11001011 ; 11001100 ;...

9 months ago

Solved


Find sum of negative elements in row.
Find sum of negative elements in row. Example x=[1 -5 3 4 -6 6 7 8 9 10] result = -11

9 months ago

Solved


Select primes from the matrix.
Select primes from the matrix.

9 months ago

Solved


Simple Vector Addition
Take two incoming vectors and output the sum of the two vectors

9 months ago

Solved


Replace 0 indices in array with 1's
Take a incoming vector, and replace 0's with ones

9 months ago

Solved


Determine if a row vector has NaN
Determine if a row vector x has NaN

9 months ago

Solved


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

9 months ago

Solved


Remove Lower Case Letters
Example MEMOry --> MEMO IMPlEMeNtATiON --> IMPEMNATON

10 months ago

Solved


Calculate Engine Power
Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm

10 months ago

Solved


Create vector as shown in test cases
Create vector as shown in test cases

10 months ago

Solved


Generate pi using logarithm
Generate pi using logarithm

10 months ago

Solved


Least common multiple of many numbers
1:6 -> 60

10 months ago

Solved


Getting the absolute index from a matrix
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to get the <http://www.ma...

10 months ago

Solved


Find Out sum of principal diagonal element of given matrix
Find out sum of principal diagonal element of given matrix If A=[1 0 0; 0 1 0;0 0 1], then answer must be 3.

10 months ago

Solved


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

10 months ago

Solved


Compute LOG(1+X) in natural log
Compute LOG(1+X) in natural log

10 months ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

10 months ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

10 months ago

Solved


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

10 months ago

Solved


Matlab Basics II - Max & Index of Max
Write a function that takes a vector x, then returns both the max value in x and its location in the vector for example x ...

10 months ago

Solved


Replace every 3rd element in a vector with 4
x is a vector of undetermined length You are to replace every 3rd element with the number 4, example: x = [11 23 34 43 2 3...

10 months ago

Load more