A résolu


AND
If a greater than 0 and n less than 10, b = true, else, b = false. (Checking a should be in one line by AND special sign in MAT...

3 mois il y a

A résolu


Nested If(s)
If a greater than zero, then check, if a = greater that 1 and less than 10, then b = true, else, b = false.

3 mois il y a

A résolu


If-Elseif-Else
If a more than zero, b = true, if a = zero , b = zero, else, b = false.

3 mois il y a

A résolu


If-Else
If a more than zero, b = true, else, b = false.

3 mois il y a

A résolu


If
If a more than zero, then b = true.

3 mois il y a

A résolu


ICFP2021 Hole-In-Wall: Calculate Score
The ICFP held its annual 3-day contest in July 2021 with Hole-In-Wall. Contest Specification. The contest folds the figure in R...

3 mois il y a

A résolu


Which Prime
Given two prime numbers, specify the relation between them i.e. - 'Twin Prime', 'Cousin Prime', 'Sexy Prime' or 'None'

3 mois il y a

A résolu


Palindromic Primes
A Palindromic Prime is a prime number that is also a palindromic number. (Wiki, OEIS) If given a monotonic series (increment...

3 mois il y a

A résolu


Hoax Numbers
A Hoax Number (OEIS A019506) is defined as a composite number, whose sum of digits is equal to the sum of digits of its distinct...

3 mois il y a

A résolu


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

3 mois il y a

A résolu


Generate a matrix as follows
write a Function that gives like the following for a random n: n=2 ans= [ 0 1 1 0] n=6 ans= [ 0 ...

3 mois il y a

A résolu


Write script that gives matrix like the following example:)
if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

3 mois il y a

A résolu


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

3 mois il y a

A résolu


Create a function that gives a matrix like the following
x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

3 mois il y a

A résolu


Peg Solitaire - Apply Move
About Peg Solitaire . Previous Problem. Consider inital board; If we move the peg located on (4,6) to the left (4) directio...

3 mois il y a

A résolu


Peg Solitaire - Get Possible Moves
About Peg Solitaire. Consider following initial board; (1) indicates there is a peg and (0) indicates empty holes. For thi...

3 mois il y a

A résolu


MATLAB Basics: Complex Argument
For a given complex number, x, return the argument, y, in degrees.

3 mois il y a

A résolu


MATLAB Basics: Complex Conjugates
For a given complex number, x, return the complex conjugate, y.

3 mois il y a

A résolu


Pick the die most likely to win
After discussing Rock, Paper, Scissors, Lizard, Spock in The Simpsons and their Mathematical Secrets, Simon Singh writes that in...

3 mois il y a

A résolu


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

3 mois il y a

A résolu


Convert Thermocouple output voltage (in mV) to Temperature (in C)
Convert Thermocouples of types (B,E,J,K,N,R,S,T) output junction voltage (in mV) to temperature (in C) using NIST coefficients r...

3 mois il y a

A résolu


Compute a sum involving the totient over divisors of a number
Write a function to compute the following sum: where is the totient function. The sum is computed over the divisors of (inc...

3 mois il y a

A résolu


The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.] Bonus though...

3 mois il y a

A résolu


Radioisotope Thermoelectric Generator (RTG)
Given an isotope's atomic mass (in amu), half-life (in years(a) or days(d)), and average kinetic energy absorbed (of emitted dec...

3 mois il y a

A résolu


Nuclear Binding Energy
Compute the approximate nuclear binding energy in MeV using the least-squares fit of the semi-emirical mass formula. Round to th...

3 mois il y a

A résolu


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

3 mois il y a

A résolu


Matrix convolution
A certain convolution step involves an elementwise multipication between two 3x3 matrices and taking the resulting sum of the el...

3 mois il y a

A résolu


Stacking vectors into a matrix
Given a 4x1 vector a, and a 2x2 matrix b, create a matrix M in which the first 2 rows are each identical to a and the last two r...

3 mois il y a

A résolu


Logarithmically spaced vector creation using linspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Avoid using logspace and use the linsp...

3 mois il y a

A résolu


Logarithmically spaced vector creation using logspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Use the logspace operator.

3 mois il y a

Charger plus