A résolu


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

presque 10 ans il y a

A résolu


Divisible by 2
This is the first problem in a set of "divisible by x" problems. You will be provided a number as a string and the function you ...

presque 10 ans il y a

A résolu


Rank of magic square (for beginners)
Compute the rank r of a magic square of order n WITHOUT rank and magic functions.

presque 10 ans il y a

A résolu


Matrix Generation.
if input n =1, generate a matrix y = [1]

presque 10 ans il y a

A résolu


Soccer - TOTO
How many different outcomes are there in a soccer-TOTO with n games? For each game there are three results: win - loss - equa...

presque 10 ans il y a

A résolu


Cofactor
Given a matrix, find the cofactor of the element in 'i'th row and 'j'th column.

presque 10 ans il y a

A résolu


normalize group of numbers to integers
Hi guys! I have a group of 4 numbers x,y,z,w which comes from 4 integers multiplied with a common factor. [x,y,z,w] = c [i,j,k,...

presque 10 ans il y a

A résolu


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

presque 10 ans il y a

A résolu


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

presque 10 ans il y a

A résolu


Can I make a right triangle ?
Input(a) - is vector with any amount of values. Interpreted as legths of sides. Output(b): * Is true if there are any 3 va...

presque 10 ans il y a

A résolu


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

presque 10 ans il y a

A résolu


Bit calculation
Give me the count of numbers from 1 to n having their last two bits as 0. For example function y = ret_count(4) y = x...

presque 10 ans il y a

A résolu


Combination logic
Create an algorithm in MATLAB that calculate the combination for the given positive integers n and k as inputs. When k > n, the ...

presque 10 ans il y a

A résolu


Convert number from given base to other base
Convert number from given base to other base. Example 400 in base 5, find equivalent number in base 8, it is 144.

presque 10 ans il y a

A résolu


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

presque 10 ans il y a

A résolu


Find the sum of n squares
What is the sum of the squares of the first n integers?

presque 10 ans il y a

A résolu


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

presque 10 ans il y a

A résolu


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

presque 10 ans il y a

A résolu


imaginary results
Return the value of the imaginary number i to the power of input argument n.

presque 10 ans il y a

A résolu


Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

presque 10 ans il y a

A résolu


find whether it is prime or not
For a given number find if its prime

presque 10 ans il y a

A résolu


persistant sum
There will be 9 tests for this problem. In each test you will be provided with 2 integers n=[n1,n2], where n2 is equal to t...

presque 10 ans il y a

A résolu


Sum of series IV
What is the sum of the following sequence: Σ(-1)^(k+1) (2k-1)^2 for k=1...n for different n?

presque 10 ans il y a

A résolu


Crate a vector of logarithmically spaced
Create a vector of logarithmically spaced from 10^0 to 10^x with n sample Example: if x=4 and n=3 Answer must be=[1 100 10...

presque 10 ans il y a

A résolu


Ordinal numbers
Given an integer n, return the corresponding ordinal number as a character string. For example, ord(1)='1st' ord(2)=...

presque 10 ans il y a

A résolu


Too Many Zeros, Dump Them!
Sometimes when I create a matrix, I use this syntax: a = zeros(1000,1000); But when the function ends, I find that I don'...

presque 10 ans il y a

A résolu


give-nth-decimal-place-of-pi up to 100 digits
max 100th place after the decimal point this is upgrade problem of 142

presque 10 ans il y a

A résolu


It's race time again! Write a function that is at least twice as fast as the test suite call of repmat().
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. This must be done in l...

presque 10 ans il y a

A résolu


Coin change combinations.
Using only pennies (1), nickels (5), dimes (10), quarters (25), half dollars (50), and dollars (100), how many different combina...

presque 10 ans il y a

A résolu


Three grind is shipsstraigt
A function that returns either 'Rock', 'Scissors', or 'Paper' (string). You may succeed or you may fail the (case insensitive) t...

presque 10 ans il y a

Charger plus