Community Profile

photo

Patrick Fernandes


Last seen: 2 months ago
216 total contributions since 2020

Patrick Fernandes's Badges

  • CUP Challenge Master
  • Promoter
  • Introduction to MATLAB Master
  • Community Group Solver
  • Solver

View details...

Contributions in
View by

Solved


Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

4 months ago

Solved


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

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

5 months ago

Solved


~~~~~~~ WAVE ~~~~~~~~~
|The WAVE generator| Once upon a time there was a river. 'Sum' was passing by the river. He saw the water of the river that w...

5 months ago

Solved


Draw 'B'
Draw a x-by-x matrix 'B' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 0 1 0 0 0 1 ...

5 months ago

Solved


Draw a 'N'!
Given n as input, generate a n-by-n matrix 'N' using 0 and 1 . Example: n=5 ans= [1 0 0 0 1 1 1 0 0 1 1 0 ...

5 months ago

Solved


Draw 'C'.
Given x as input, generate a x-by-x matrix 'C' using 0 and 1. example: x=4 ans= [0 1 1 1 1 0 0 0 ...

5 months ago

Solved


Draw 'H'
Draw a x-by-x matrix 'H' using 1 and 0. (x is odd and bigger than 2) Example: x=5 ans= [1 0 0 0 1 1 0 0 0 1 ...

5 months ago

Solved


Draw 'J'
Given n as input, generate a n-by-n matrix 'J' using 0 and 1 . Example: n=5 ans= [0 0 0 0 1 0 0 0 0 1 0 0 ...

5 months ago

Solved


Draw a 'X'!
Given n as input Draw a 'X' in a n-by-n matrix. example: n=3 y=[1 0 1 0 1 0 1 0 1] n=4 y=[1 0 0...

5 months ago

Solved


Draw 'E'
Draw a x-by-x matrix 'E' using 1 and 0. (x is odd and bigger than 4) Example: x=5 ans= [1 1 1 1 1 1 0 0 0 0 ...

5 months ago

Solved


Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
Submit your answer to this problem a multiple of 5 seconds after the hour. Your answer is irrelevant; the only thing that matte...

6 months ago

Solved


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

6 months ago

Solved


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

6 months ago

Solved


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

6 months ago

Solved


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

6 months ago

Solved


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

6 months ago

Solved


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

6 months ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

6 months ago

Solved


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

6 months ago

Solved


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

6 months ago

Solved


Matlab Basics II - Extract last 3 elements of a vector
Let x be a vector of unknown length, we are always interested in the last 3 numbers in the vector, write a function that gives t...

6 months ago

Solved


Saving MATLAB session to a file
How to save MATLAB session to a file?

6 months ago

Solved


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

6 months ago

Solved


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

6 months ago

Solved


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

6 months ago

Solved


Min of a Matrix
Return the minimum value in the given matrix.

6 months ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

6 months 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

6 months ago

Solved


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

6 months ago

Load more