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

4 years ago

Solved

Doubling elements in a vector

Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

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

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

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

4 years ago

Solved

How to calculate log?

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

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

4 years ago

Solved

Plus x: A first program

_Solve this problem in Mathwork's online Cody system._ Write a statement that assigns y with 5 plus x. Ex: If input x = 2,...

4 years ago

Solved

Skip by a multiple

Given an integer create an array of its multiples. Array must have a length of 15

4 years ago

Solved

Alkane

Given a number, x, that is equal to the number of carbon atoms in an <http://en.wikipedia.org/wiki/Alkane alkane>, find, y, the ...

4 years ago

Solved

Element by element multiplication of two vectors

Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

4 years ago

Solved

Replacing a row

For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

4 years ago

Solved

Indexing the last element: Print queue

* Delete the last element of row array printQueue.

4 years ago

Solved

Average of square wave

given positive and negative peak , calculate dc level, 50% duty cycle

4 years ago

Solved

Find the area of the four walls

If length, breadth and height of the walls are given, find the area of the four walls.

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

4 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

4 years ago

Solved

Create an anti-identity matrix

Create an anti-identity matrix of given dimension. Examples n = 2 A = [0 1; 1 0] n = 3 A = [0 0 1; 0 1 0; 1 0 0...

4 years ago

Solved

Find out value of sine given by degree.

Find out value of sine given by degree. If theta=30, it's value must be 0.5.

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

4 years ago

Solved

Rounding off numbers to n decimals

Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...

4 years ago

Solved

Sort complex numbers into complex conjugate pairs

Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

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

4 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

4 years ago

Solved

MATLAB Basic: rounding II

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

4 years ago