Solved


Finding two missing number in 1 to n array
You are given an array of numbers from 1 to n with two missing numbers. Return the two missing numbers. Input: x=[5 2 0 1 ...

2 years ago

Solved


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

2 years ago

Solved


Remove all the columns contains only zero
Remove the column from the matrix which has only zeros . Refer the Example below a= 1 0 3 0 23 0 56 0 1 ...

2 years ago

Solved


Extract a specific part of matrix!
In the given matrix, extract element that have odd rows and column number. For example A=[1 4 2 3 5] B=extractodd(A);...

2 years ago

Solved


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

2 years ago

Solved


factorial
factorial

2 years ago

Solved


multiply 2 by 2
multiply 2 by 2

2 years ago

Solved


Find the number of rectangles
There is a m*n grade given. Find the number of rectangles in the grid. Remember, a square is also a rectangle.

2 years ago

Solved


Find x in provided equation!
x^2-2*x+1=0 This polynomial can be expressed by using each term's coefficients, such as [1 -2 1]. Using the polynomial ...

2 years ago

Solved


Change string to number
Change given string to number. (hint: there is already function) Changing from ['1234'] to [1234] is one of example

2 years ago

Solved


How to calculate log?
There is a log that have base 5. How to calculate? log5(x)?

2 years ago

Solved


Determine point is located in a circle or not
Using input [x] and [y], determine the points (x,y) is located inside of circle (x^2+y^2=1) if point is located in circle,...

2 years ago

Solved


Calculate area of sector
A=function(r,seta) r is radius of sector, seta is angle of sector, and A is its area. Area of sector A is defined as 0.5*(r^2...

2 years ago

Solved


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

2 years ago

Solved


Back to basics 26 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of strings of all MATLAB keywords.

2 years ago

Solved


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

2 years ago

Solved


Moving average (variable kernel length)
Find the moving average in a vector. The kernel length is a variable. For example x = 1:10 kernel_length = 2 would r...

2 years ago

Solved


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

2 years ago

Solved


Sum of digit range
Example: If A is n1, and B is n2 digit positive numbers. A*B's digit range will be [c d] (c = min & d = max). Then return ...

2 years ago

Solved


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

2 years ago

Solved


Mirror Image matrix across anti-diagonal
Given an input number x, create a Mirror Image matrix 'Y' across anti-diagonal in following way:- Example:- If x=3, Y= [1 ...

2 years ago

Solved


Matlab Basics II - 3 Dimensional Arrays
Assume x is a 3D array with n pages, representing students in a class, for each student (page in the array, the 3rd dimension), ...

2 years ago

Solved


Reverse digits of a number
Reverse digits of a number. For example, return *321* for the input *123* . The left-hand zeros can be discarded. For exam...

2 years ago

Solved


MATLAB Basic: rounding IV
Do rounding towards plus infinity. Example: -8.8, answer -8 +8.1 answer 9 +8.50 answer 9

2 years ago

Solved


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

2 years 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

2 years ago

Solved


Generate vector according to sign of vector
Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

2 years ago

Solved


Rotate array 90 degrees
Rotate the given matrix by 90 degrees. Example, A = [1 2 3 ; 4 5 6 ] B = rotated(A) = [ 3 6; 2 5; 1 4 ]

2 years ago

Solved


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

2 years ago

Solved


Initialize a Natural Number matrix.
Given length of matrix initialize a matrix consisting of natural numbers from 1 to n: n = 10; x = [ 1 2 3 4 5 6 7 8 9 10]; ...

2 years ago

Load more