Solved


number of groups
In a classroom, *n* students work on a special project and the other students work in groups of five. If there are 18 students i...

4 months ago

Solved


Distance Between Points
Being n the number of points (If n = 3 there would be 3 points: A, B and C). The distance between each pair of points increases...

4 months ago

Solved


Number of o rderd pairs of integers (I,J) that can be formed.
Write a MATLAB function that calculates the number of ordered pairs of integers (I, J) that can be formed satisfying the condit...

4 months ago

Solved


Ordered pairs of integers (I, J).
Write a MATLAB function that calculates the number of ordered pairs of integers (I, J) that can be formed satisfying the conditi...

4 months ago

Solved


Calculate vowel / consonant ratio of a string
Given a string, calculate the ratio of vowels to consonants for example : x = 'This is a very good Day!' y = 7/11

4 months ago

Solved


Find the binary code
Given a sinusoidal signal, create a function that returns the binary code of a quantized value. The function takes the bit lengt...

4 months ago

Solved


short or buy ? take the opportunity
you had already calculated a theoretical stock value, now you checked in bloomberg the quoted price of that stock and you have t...

4 months ago

Solved


Monkey and the Peaches
A monkey picked a certain number of peaches on the first day. Each day, the monkey eats half of the remaining peaches plus one ...

4 months ago

Solved


How to get the additive inverse of a uint8.
Given x as a uint8 find the additive inverse y.

4 months ago

Solved


List the near-square primes, p = n² + 1 (Landau's 4th problem)
Historical context At the 1912 International Congress of Mathematicians, Edmund Landau listed four basic problems about prime...

4 months ago

Solved


Secret Message and Acrostic
One of the simplest ways to hide a message involves utilizing uppercase letters. Given a text, collect all uppercase letters in...

4 months ago

Solved


Sum of Dividend Digits
Find the smallest number that consist of only number 1's (e.g. 11111111111) which satisfy a given divisor and remainder. Then re...

4 months ago

Solved


Sum of digit range
Example: If A is n1, and B is n2 digit positive numbers. A*B's digit range will be [c d] (c = min & d = max). Then return ...

4 months ago

Solved


Logarithm with base other than 'e'
The standard log() function in Matlab returns the natural logarithm (base equal to Euler's constant). Compute the logarithm for ...

4 months ago

Solved


With apologies to William Blake
Coder Coder, typing fast Sitting at your desk, aghast. What immortal MATLAB script will solve this problem, nice and qu...

4 months ago

Solved


Combination of Vectors
Return a combination of vectors x1, x2 based on y1, y2 per: x(j) = 0 if y1(j) < y2(j) x(j) = x1(j) if y1(j)...

4 months ago

Solved


Put all numbers in a string inside square brackets
Examples: 'left3down2' -> 'left[3]down[2]' 'fiat500' -> 'fiat[500]'

4 months ago

Solved


Explode string
Break a sentence into cell of words

4 months ago

Solved


Sort vector by number of prime factors of each element
Sort a given array based on how many prime factors each term has. Sort from least to greatest and output original values. Ex: ...

4 months ago

Solved


Find the number that has most primes those less than it
Given an vector x of integer numbers, find the element of x that has the most primes less than it.

4 months ago

Solved


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

4 months ago

Solved


How long does it take to run a bath?
Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

4 months ago

Solved


Carnot cycle
Carnot engine is considered the most efficient heat engine.When operated between two temperatures T1 and T2, the efficiency is g...

4 months ago

Solved


Find the Peak Particle Velocity on a ETL structure
PPV is a vibration parameter that can connect stress to a structure, it is measured in mm/s or mm/s-1. The higher the PPV the mo...

4 months ago

Solved


Calculate the Voltage Through a Step-Up Transformer
Given a step-up transformer has a primary coil with A number loops, a secondary coil with B number loops, and a primary voltage ...

4 months ago

Solved


Convert decimal to hex as shown in test cases
Convert decimal to hex as shown in test cases.

4 months ago

Solved


Try and Catch Simple Example
Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

4 months ago

Solved


Sum of Even Fibonacci Numbers
Description: The Fibonacci sequence is defined as follows:F(1)=1,F(2)=1,F(n)=F(n−1)+F(n−2) for n>2 Write a function that compu...

4 months ago

Solved


Estimating Battery Lifetime Based on Load Profile and Depth of Discharge (DoD)
In a Battery Management System (BMS), the lifetime of a battery depends on various factors, including the Depth of Discharge (Do...

4 months ago

Solved


Battery Discharge Time Estimation
In a Battery Management System (BMS), the estimated discharge time (T) of a battery can be calculated as: ​​ where: ​ is the ...

4 months ago

Load more