Community Profile

Foufa.h

99 total contributions since 2016

View details...

Contributions in
View by

Solved

Counting Money
Add the numbers given in the cell array of strings. The strings represent amounts of money using this notation: \$99,999.99. E...

4 mois ago

Solved

Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

4 mois ago

Solved

Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

4 mois ago

Solved

Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

4 mois ago

Solved

Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

4 mois ago

Solved

select the primes of a vector
Find the prime numbers in a vector

4 mois ago

Solved

vectorization in N
For a given integer n (n>1), compute the sum f (i) (1 <= i <= n) where f (i) = 1 if n is odd and 2 otherwise.

4 mois ago

Solved

Remove NaN ?
input -> matrix (n*m) with at least one element equal to NaN; output -> matrix(p*m), the same matrix where we deleted the enti...

4 mois ago

Solved

Is my wife right?
Regardless of input, output the string 'yes'.

4 mois ago

Solved

Check if number exists in vector
Return 1 if number _a_ exists in vector _b_ otherwise return 0. a = 3; b = [1,2,4]; Returns 0. a = 3; b = [1,...

8 mois ago

Solved

Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

8 mois ago

Solved

Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

9 mois ago

Solved

started with 3 cookies and you never ate any how many are left

plus d'un an ago

Solved

Sum of Two Numbers
Given two integer numbers x and y, calculate their sum and put it in z. Examples: Inputs x = 2, y = 4 Output z is 6 ...

plus d'un an ago

Solved

Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

plus d'un an ago

Solved

Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

plus d'un an ago

Solved

Is it really a 5?
A number containing at least one five will be passed to your function, which must return true or false depending upon whether th...

plus d'un an ago

Solved

How to subtract?
* Imagine you need to subtract a few numbers using MATLAB. * You will not be using eval for this task. * Given two ASCII strin...

plus d'un an ago

Solved

You just measured its surface area, that is the input.

plus d'un an ago

Solved

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

plus d'un an ago

Solved

Replace Negative(-) by 0 and positive by 1
In a given Matrix Replace all element having *Negative sign with 0* and *Positive elements with 1* .

environ 2 ans ago

Solved

Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

environ 2 ans ago

Solved

raise 1/3
raise 1/3

environ 2 ans ago

Solved

calculate PI without using pi function
There are many methods to get the pi(Ratio of circumference to diameter). You should get pi without using the pi function in M...

environ 2 ans ago

Solved

what is the speed of the car if the car travelled 10m in 5 seconds
what is the speed of the car if the car travelled 10m in 5 seconds

environ 2 ans ago

Solved

what is the cosine of pi
what is the cosine of pi

environ 2 ans ago

Solved

what is sin of 0
what is sin of 0

environ 2 ans ago

Solved

Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

environ 2 ans ago

Solved

Volume Pillar
Calculate the volume of a pillar with radius l and heigth ar.

environ 2 ans ago

Solved

Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

environ 2 ans ago