Community Profile

photo

Quang Dung


Last seen: 5 Monate vor Aktiv seit 2021

Statistiken

  • Project Euler I
  • Draw Letters
  • CUP Challenge Master
  • Community Group Solver
  • Promoter
  • Introduction to MATLAB Master
  • Solver

Abzeichen anzeigen

Content Feed

Anzeigen nach

Gelöst


Project Euler: Problem 9, Pythagorean numbers
A Pythagorean triplet is a set of three natural numbers, a b c, for which, a^2 + b^2 = c^2 For example, 3^2 + 4^2 =...

mehr als 2 Jahre vor

Gelöst


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

mehr als 2 Jahre vor

Gelöst


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

mehr als 2 Jahre vor

Gelöst


Binary code (array)
Write a function which calculates the binary code of a number 'n' and gives the result as an array(vector). Example: Inpu...

mehr als 2 Jahre vor

Gelöst


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

mehr als 2 Jahre vor

Gelöst


Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

mehr als 2 Jahre vor

Gelöst


Given an unsigned integer x, find the largest y by rearranging the bits in x
Given an unsigned integer x, find the largest y by rearranging the bits in x. Example: Input x = 10 Output y is 12 ...

mehr als 2 Jahre vor

Gelöst


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

mehr als 2 Jahre vor

Gelöst


Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition. Examples Previo...

mehr als 2 Jahre vor

Gelöst


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

mehr als 2 Jahre vor

Gelöst


Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...

mehr als 2 Jahre vor

Gelöst


Laws of motion 3

mehr als 2 Jahre vor

Gelöst


Total energy

mehr als 2 Jahre vor

Gelöst


Potential energy calculation

mehr als 2 Jahre vor

Gelöst


Kinetic energy calculation

mehr als 2 Jahre vor

Gelöst


Laws of motion 1

mehr als 2 Jahre vor

Gelöst


Laws of motion 2

mehr als 2 Jahre vor

Gelöst


Laws of motion 4

mehr als 2 Jahre vor

Gelöst


Laws of motion 5

mehr als 2 Jahre vor

Gelöst


Laws of motion 6

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

mehr als 2 Jahre vor

Gelöst


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

mehr als 2 Jahre vor

Gelöst


Flip the main diagonal of a matrix
Given a n x n matrix, M, flip its main diagonal. Example: >> M=magic(5); >> flipDiagonal(M) 9 24 1 ...

mehr als 2 Jahre vor

Gelöst


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

mehr als 2 Jahre vor

Gelöst


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

mehr als 2 Jahre vor

Gelöst


Back to basics 23 - Triangular matrix
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, return a matrix with all elements above a...

mehr als 2 Jahre vor

Gelöst


Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody. Given an input matrix, generate an output matrix that consists o...

mehr als 2 Jahre vor

Mehr laden