Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


Generate pi using logarithm
Generate pi using logarithm

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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.

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

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

11 meses hace

Resuelto


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

11 meses hace

Resuelto


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

11 meses hace

Cargar más