Solved


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

2 months ago

Solved


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.

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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

2 months ago

Solved


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.

2 months ago

Load more