Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


Generate pi using logarithm
Generate pi using logarithm

10 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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

10 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Gelöst


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 Monate vor

Mehr laden