Community Profile

photo

Samuel Ammann


Last seen: environ 3 ans il y a Actif depuis 2020

Statistiques

  • Creator
  • Solver

Afficher les badges

Content Feed

Afficher par

A résolu


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

plus de 3 ans il y a

A résolu


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

plus de 3 ans il y a

A résolu


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

plus de 3 ans il y a

A résolu


Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

plus de 3 ans il y a

A résolu


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

plus de 3 ans il y a

A résolu


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Integer or Float?
Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise ret...

plus de 3 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...

plus de 3 ans il y a

A résolu


What number has this problem?
This problem is added because it is problem number *???* in the "Community" problems section. <http://www.mathworks.de/matlab...

plus de 3 ans il y a

A résolu


Replace Vector Elements
Replace all elements in a vector which are equal to or smaller than zero with 0.1. Example: A = [1 2 3 -1 0 2 -3 -80]; ...

plus de 3 ans il y a

A résolu


Summy's even sum

plus de 3 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 3 ans il y a

Problème


find the lowest number with given amount of integer factors

plus de 3 ans il y a | 1 | 10 solveurs

A résolu


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

plus de 3 ans il y a

A résolu


Extract leading non-zero digit
<http://en.wikipedia.org/wiki/Benford%27s_law Benford's Law> states that the distribution of leading digits is not random. This...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

plus de 3 ans il y a

A résolu


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

plus de 3 ans il y a

A résolu


Pangrams!
A pangram, or holoalphabetic sentence, is a sentence using every letter of the alphabet at least once. Example: Input s ...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Swap the first and last columns
Flip the outermost columns of matrix A, so that the first column becomes the last and the last column becomes the first. All oth...

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

Charger plus