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

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

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

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

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

fast 4 Jahre ago

Solved

How to calculate log?

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

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

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

fast 4 Jahre ago

Solved

Skip by a multiple

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

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

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

fast 4 Jahre 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

fast 4 Jahre ago

Solved

Indexing the last element: Print queue

* Delete the last element of row array printQueue.

fast 4 Jahre ago

Solved

Average of square wave

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

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

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

fast 4 Jahre ago

Solved

MATLAB Basic: rounding IV

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

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

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

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

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

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

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

fast 4 Jahre 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

fast 4 Jahre ago

Solved

MATLAB Basic: rounding II

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

fast 4 Jahre ago