Solved


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

1 year ago

Solved


Number Puzzle - 043

1 year ago

Solved


Number Puzzles - 012

1 year ago

Solved


Ordinary Annuity : Number of payments (Future Value)
Theorem : Future Value of an Ordinary Annuity where; F : Future value A : Periodic payment r : Rate per period n : Numbe...

1 year ago

Solved


Logarithmically spaced vector creation using logspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Use the logspace operator.

1 year ago

Solved


How many apples
You have x apples I take from you y apples now how many apples you have ?

1 year ago

Solved


Palindrome vector
Check if a given vector is Palindrome. Example, [1 2 54 32 45 5 33 456 45 456 33 5 45 32 54 2 1]

1 year ago

Solved


Draw 'S'
draw S using nxn matrix, where n is odd and greater than 4 S = [1 1 1 1 1 1 0 0 0 0 1 1 1 1 1 0 0 0 0 1 ...

1 year ago

Solved


Sum of Arithmetic Progression
Given the starting number, difference and the number of terms - find the sum of the arithmetic progression.

1 year ago

Solved


Logarithmically spaced vector creation using linspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Avoid using logspace and use the linsp...

2 years ago

Solved


Number Puzzle - 066

2 years ago

Solved


Number Puzzles - 004
Give an example of three distinct numbers greater than 10 whose both product and sum are palindromes. The answer is not unique a...

2 years ago

Solved


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

2 years ago

Solved


Find duplicate number from a vector of size n + 1 containing numbers from 1:n
From a given vector of size n + 1, return the duplicate number. Constraints The vector can only contain numbers from 1 to ...

2 years ago

Solved


Find the standard deviation of an array
given an array, find it's standard deviation without using the std() function. Use sample formula (n-1) for standard deviation a...

2 years ago

Solved


Approximation of an integral - Riemann sum
Riemann sum is a certain kind of approximation of an integral by a finite sum. In this problem, I want you to use Midpoint Riem...

2 years ago

Solved


Determine the perimeter of a three-quarter circle
If a circle has a diameter of x as an input value, then show the value of the perimeter of the three-quarter circle in output va...

2 years ago

Solved


Form Blocks in a 1D array
Lets say I have an array of size (10,1); I want to divide it into the num number of blocks which are given by user no_of_b...

2 years ago

Solved


Singular Value Decomposition
Calculate the three matrices of the singular value decomposition (A = U*S*V^T) for each provided matrix. U and V are square unit...

2 years ago

Solved


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

2 years ago

Solved


Find the number of days in a given year
Given a year number (eg. 2000) as input, find how many days are there in the given year.

2 years ago

Solved


Summation of Non Zeros Numbers in String Variable
Find the Summation of Non Zeros Numbers in String Variable The input : x = '100205' The Output : y = 8

2 years ago

Solved


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

2 years ago

Solved


Determine if the square root is an integer.
Write code that returns true if perfect square and returns false if square root is not an integer.

2 years ago

Solved


Alternate Arrangement
Determine the ways of arranging 'm' men and 'w' women alternatively in a row of 's' seats. Assumptions : s<m and s<w

2 years ago

Solved


Compound interest - number e
A moneylender wants to receive his annual interest of 12% more frequently. If he receives his interest rate every six months,...

2 years ago

Solved


Stacking vectors into a matrix
Given a 4x1 vector a, and a 2x2 matrix b, create a matrix M in which the first 2 rows are each identical to a and the last two r...

2 years ago

Load more