Solved


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

8 months ago

Solved


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

8 months ago

Solved


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

8 months ago

Solved


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

8 months ago

Solved


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

8 months ago

Solved


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

8 months ago

Solved


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

8 months ago

Solved


Calendar Matrix
Return a calendar matrix for the given values of month and year. Assume that Sunday is the first day of the week. The resulting ...

8 months ago

Solved


Rainbow matrix
Create a "rainbow matrix" as described in the following examples Input = 3 Output = [ 1 2 3 2 3 2 ...

8 months ago

Solved


Create a block diagonal matrix
A block diagonal matrix is a square matrix that can be written as A = [a 0 0 0 0 b 0 0 0 0 c 0 ...

8 months ago

Solved


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

8 months ago

Solved


Estimating Monthly Electricity Cost for a Household Appliance
You recently bought an electric kettle for your kitchen, and you want to estimate how much it costs to run every month. The kett...

8 months ago

Solved


Voltage Divider Calculation
A voltage divider is a simple circuit used to obtain a reduced voltage from a higher voltage source using two resistors in serie...

8 months ago

Solved


LED Current Calculation
In an electrical circuit, the current (III) flowing through an LED is determined using Ohm’s Law: ​​ Where: I is the current ...

8 months ago

Solved


Inductor Energy Storage Calculation
The energy (EEE) stored in an inductor is given by the formula: Where: E is the energy in joules (J) L is the inductance in...

8 months ago

Solved


Calculate Charge Using Capacitance and Voltage
The charge (Q) stored in a capacitor is given by the formula:Q=C×V where: C is the capacitance (in farads) V is the voltage (...

8 months ago

Solved


Energy Stored in a Capacitor
The energy (E) stored in a capacitor is given by the formula: where: C is the capacitance (in farads) V is the voltage (in ...

8 months ago

Solved


Calculate Current in a Series Circuit Using KVL
Kirchhoff's Voltage Law (KVL) states that the sum of voltages around a closed loop is zero. Given a voltage source (V) and three...

8 months ago

Solved


Calculating the Total Resistance in a Series Circuit
Description: In a series circuit, the total resistance is the sum of the individual resistances. This problem asks you to write ...

8 months ago

Solved


Simple Electrical Power Calculation
Calculate the electrical power using the formula: P=V×I where: V is the voltage (in volts) I is the current (in amperes)

8 months ago

Solved


Ohm’s Law - Calculate Resistance
Ohm’s Law states that resistance R can be calculated as:R=V/I​ where: V is the voltage (in volts) I is the current (in ampere...

8 months ago

Solved


Coin Tossing: Probability of Same Heads for N tosses
A pair of physicists toss a coin n times each. What is the probability that they tossed the same number of heads? Input: N % n...

8 months ago

Solved


Resistance of a light bulb
The current through two identical light bulbs connected in series is C Amperes. The total voltage across both bulbs is V Volts....

8 months ago

Solved


Check p² = 24k + 1, p > 3, the 'golden prime squares' equation
Historical context In december 2023, I / Nicolas Douillet was working on prime squares properties and I found* the formula : ...

8 months ago

Solved


pressure to dB?
given x ratio of pressure, find corresponding y dB

8 months ago

Solved


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

8 months ago

Solved


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

8 months ago

Solved


Special Relativity 101.
Special relativity states that the effective mass of an object varies as a function of its velocity. If *c* is the speed of ligh...

8 months ago

Solved


Periodic Table 101.
Given the atomic number (z), answer the symbol for that particular element of the <http://en.wikipedia.org/wiki/Periodic_table/ ...

8 months ago

Solved


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

8 months ago

Load more