Community Profile

photo

Piotr Lesniewski


Politechnika Lodzka

Last seen: 2 mois il y a Actif depuis 2016

Followers: 0   Following: 0

Contact

Statistiques

  • Draw Letters
  • Sequences And Series III Master
  • Cody5 Easy Master
  • Magic Numbers Master
  • Commenter
  • Introduction to MATLAB Master
  • Promoter
  • Solver

Afficher les badges

Feeds

Afficher par

A résolu


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

presque 2 ans il y a

A résolu


5th Time's a Charm
Write a function that will return the input value. However, your function must fail the first four times, only functioning prope...

presque 2 ans il y a

A résolu


Create Combination
Motivation: In many problems, we need to create combinations with the function nchoosek. In some cases, however, choices are lim...

environ 4 ans il y a

A résolu


Matrix indexing with two vectors of indices
Given a matrix M and two index vectors a and b, return a row vector x where x(i) = M(a(i),b(i)).

environ 4 ans il y a

A résolu


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

environ 4 ans il y a

A résolu


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

environ 4 ans il y a

A résolu


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

environ 4 ans il y a

A résolu


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

environ 4 ans il y a

A résolu


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

environ 4 ans il y a

A résolu


Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

environ 4 ans il y a

A résolu


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2 3] -> [1 1 2 2 3 3] ...

environ 4 ans il y a

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

environ 4 ans il y a

A résolu


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

environ 4 ans il y a

A résolu


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

environ 4 ans il y a

A résolu


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

environ 4 ans il y a

A résolu


Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...

environ 4 ans il y a

A résolu


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

environ 4 ans il y a

A résolu


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

environ 4 ans il y a

A résolu


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

environ 4 ans il y a

Charger plus