Community Profile

photo

Mouhamed Niasse


142 total contributions since 2020

Engineer: EEE EME
Languages: French, English
Country: Senegal
Interest: Power systems

Contact

Mouhamed Niasse's Badges

  • Project Euler I
  • MATLAB Central Treasure Hunt Finisher
  • Knowledgeable Level 2
  • CUP Challenge Master
  • Introduction to MATLAB Master
  • Community Group Solver
  • Commenter
  • Promoter
  • First Submission
  • First Review
  • Solver
  • Revival Level 2
  • 3 Month Streak
  • First Answer

View details...

Contributions in
View by

Solved


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

3 hours ago

Solved


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

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

3 hours ago

Solved


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

10 hours ago

Answered
How to get quotient value after division without round off?
Hello, I tried to execute your portion of code but, just as expected, n1 has the value 78 not 79 for me. Try using the functio...

11 hours ago | 0

| accepted

Solved


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

1 day ago

Answered
Electromotive Force Voltage Example
Hello, From the second line of your code, you need to know first what is the physical meaning of each paramaters ('v', 'B', 'le...

1 day ago | 0

Solved


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

1 day ago

Answered
PV array and grid for battery charging
Hello, You cannot just randomly connect your batteries' (+) to the AC side, the (-) to the DC side of the grid and expect to ha...

2 days ago | 0

Solved


Remove all the consonants
Remove all the consonants in the given phrase. Example: Input s1 = 'Jack and Jill went up the hill'; Output s2 is 'a ...

2 days ago

Solved


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

2 days ago

Solved


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

3 days ago

Solved


Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

3 days ago

Answered
Removing a row from a matrix when one value is zero without hardcoding
Hello, Here is what i achieved. Hope it does help you. BoeingStock(BoeingStock(:,4)==0,:)=[]

4 days ago | 0

Answered
How the calculate laplace x(t) = (exp^-at)*u(t) matlab?
Hello, Here is what i achieved. You'll need to re-define your constant "a" and your function u(t). Hope it helps you understan...

5 days ago | 0

| accepted

Answered
Can someone explain this Code?
Hello, Here is what i achieved to help you understand your algorithm. You can run the code and track how variables evolve throu...

5 days ago | 0

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

5 days ago

Answered
Matrix B from column of matrix A with condition
Hello, Here is what i achieved. Hope you can easily understand it. A=randi(5,5) % Just for an example, A is a 5x5 array of ran...

6 days ago | 1

| accepted

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

6 days ago

Solved


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

6 days ago

Solved


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

6 days ago

Solved


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

6 days ago

Solved


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

6 days ago

Solved


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

6 days ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

7 days ago

Solved


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

7 days ago

Solved


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Examp...

7 days ago

Solved


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

7 days ago

Solved


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

7 days ago

Answered
Eliminate rows from an array
Hello, this is what you tried to achieve: data3(1+length(data3)/2:length(data3),:)=[]; Try to run below example. Hope it helps...

7 days ago | 1

Load more