Risolto


Multiply each matrix element by its row index and add its column index.
Return a matrix the same size as the input, multiply each element by its row index and add its column index. Example: x = [ 1 ...

quasi 4 anni fa

Problema


List numbers that are not in the Fibonacci sequence
In the list of 4797 Cody problems, 53 deal with or refer to the Fibonacci sequence.* What about the other numbers? Write a funct...

quasi 4 anni fa | 0 | 10 risolutori

Problema


List the nth term of Rozhenko’s inventory sequence
Consider a sequence constructed by repeated inventories. A new inventory begins each time a zero is encountered. The first few i...

quasi 4 anni fa | 2 | 14 risolutori

Risolto


Cricket - How Much More to Beat Bradman?
Sir Don Bradman famously needed only 4 runs in his final innings to retire with an average of 100. Out for a duck, he ended inst...

circa 4 anni fa

Risolto


Remove Duplicates
Remove duplicates from the vector of integers and display in sorted order

circa 4 anni fa

Risolto


Check if a year is a leap year or not
Return 1 if a given year is a leap year or 0 if it is not

circa 4 anni fa

Risolto


Slope intercept application
Find y given slope (m), x, and y intercept (b).

circa 4 anni fa

Risolto


Determine if vector has any zeroes
Return 1 if vector has atleast 1 zero, else return 0

circa 4 anni fa

Risolto


Compute the drag on a moving vehicle
We assume no rolling resistance, and the simple rule for Drag : , where is the density of the fluid (assumed at 1.2 ), is the ...

circa 4 anni fa

Risolto


Cricket - Sort Batters by Distance Run
Given a string vector of batters' names, a vector of the total number of runs they scored, a vector of the number of 4s they sco...

circa 4 anni fa

Risolto


Partial Pressure of Water Vapor from Relative Humidity
Buck (1996, 1981) published the following constants for the saturation pressure of water*: 6.1121 (mb) The saturation pressur...

circa 4 anni fa

Risolto


Convert Volume Mixing Ratio to Density
The partial pressure of a constituent gas species of the atmosphere can be expressed in parts per million by volume. For exampl...

circa 4 anni fa

Risolto


Zero or hero
A number will be given as an input. You can be hero if it's not zero. (Just for fun)

circa 4 anni fa

Risolto


Identifying teenager
Suppose the age of a person is given. If he/she is a teenage, answer is 'yes'. Otherwise, the answer is 'no'.

circa 4 anni fa

Risolto


Create block matrix of integers (j+k-1) - Part I
Given m, n, p, and q, create a matrix of m-by-n blocks (submatrices), each sized p-by-q. The elements of the (j,k)th block all h...

circa 4 anni fa

Risolto


Air Density from Temperature and Pressure
The density of air can be estimated from the product of molar mass and molar density: Write a function that finds the densi...

circa 4 anni fa

Risolto


Molar Air Density from Temperature and Pressure
The molar density of air can be found from the Temperature and Pressure using the ideal gas law. where the Molar density STP ...

circa 4 anni fa

Risolto


Dartboard Average I
A dartboard arranges the numbers 1 to 20 such that each value is typically flanked by quite different values - for example, 20 i...

circa 4 anni fa

Risolto


Determine if Input is Oddish or Evenish (Odd/Even Sum of Digits)
Given a positive integer n, determine whether n is "oddish" or "evenish" - that is, whether the sum of the digits of n is odd or...

circa 4 anni fa

Risolto


Extract the Acrostic Message
An acrostic cipher is a way of embedding one message within another by taking the first (or last) word of each line. Given a str...

circa 4 anni fa

Risolto


Split Even Number Into Two Primes
Given an even whole number n (> 2), return a 2-element vector of primes, p, such that p(1) + p(2) = n. Fun note: technically it...

circa 4 anni fa

Risolto


Air Mass to Star for an Observer at Mean Sea Level
Air mass is a measure of how much atmosphere light from a source above the atmosphere (eg sun, planet, star) has to travel throu...

circa 4 anni fa

Risolto


Calculate Wind Chill Factor
The NWS Wind Chill Temperature (WCT) index formula for calculating the dangers from winter winds and freezing temperatures: Cal...

circa 4 anni fa

Risolto


Predict Cricket Stridulation Rate from Air Temperature
Stridulation is the process that creates a cricket's “chirp” by rubbing their wings or legs. According to the Old Farmer's Alma...

circa 4 anni fa

Risolto


Pressure for a given Above Sea Level Altitude
For altitudes up to the stratosphere (around 11 km above mean sea level), the air pressure can be estimated from: with where...

circa 4 anni fa

Risolto


Snow Accumulation and Structural Risks To Residential Properties
The density of snow depends on the amount of liquid water it contains: Dry Snow is about 50 kg/m^3 Wet Snow is about 200 kg/m^...

circa 4 anni fa

Risolto


Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...

circa 4 anni fa

Risolto


Generate Tribonacci Sequence
The "Tribonacci" sequence is an extension of the idea of the Fibonacci sequence: That is, each new term is the sum of the thr...

circa 4 anni fa

Risolto


Taylor Series
You can use a Taylor series to approximate common functions. The Taylor series for sin(x) is Using only the first several te...

circa 4 anni fa

Risolto


Where the Four Corners Am I?
The "Four Corners" region of the US is where Colorado, Utah, Arizona, and New Mexico all meet - the only place where four states...

circa 4 anni fa

Carica altro