Feeds
已解决
Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...
26 days 前
已解决
Reverse Run-Length Encoder
Given a "counting sequence" vector x, construct the original sequence y. A counting sequence is formed by "counting" the entrie...
26 days 前
已解决
Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = 2...
26 days 前
已解决
Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...
26 days 前
已解决
The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...
26 days 前
已解决
Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...
26 days 前
已解决
Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...
26 days 前
已解决
Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....
28 days 前
已解决
Counting in Finnish
Sort a vector of single digit whole numbers alphabetically by their name, in Finnish. See the Wikipedia page for <http://en.wik...
28 days 前
已解决
It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more here) asserted that readers are relatively insensitive to letter order in words, so long a...
28 days 前
已解决
Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...
28 days 前
已解决
Nearest Numbers
Given a row vector of numbers, find the indices of the two nearest numbers. Examples: [index1 index2] = nearestNumbers([2 5 3...
28 days 前
已解决
Remove all the words that end with "ain"
Given the string s1, return the string s2 with the target characters removed. For example, given s1 = 'the main event' your ...
28 days 前
已解决
Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...
28 days 前
已解决
De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...
28 days 前
已解决
Quote Doubler
Given a string s1, find all occurrences of the single quote character and replace them with two occurrences of the single quote ...
28 days 前
已解决
Given two arrays, find the maximum overlap
Given two (integer) arrays s1 and s2, create a new array s3 which is as short as possible and contains both arrays. #1 s1 = [...
28 days 前
已解决
Number of 1s in a binary string
Find the number of 1s in the given binary string. Example. If the input string is '1100101', the output is 4. If the input stri...
1 month 前
已解决
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...
1 month 前
已解决
Estimating the Range of an Electric Vehicle (EV)
In Electric Vehicles (EVs), the driving range is the estimated distance a vehicle can travel on a fully charged battery. The ran...
1 month 前
已解决
Estimating Battery Backup Time for an Inverter
In a Battery Management System (BMS), estimating the backup time of a battery-powered inverter helps determine how long it can s...
1 month 前
已解决
Battery Charge Rate Calculation
In a Battery Management System (BMS), the charge rate () of a battery can be calculated using the formula: where: is th...
1 month 前
已解决
Battery State of Health (SoH) Calculation
In a Battery Management System (BMS), the State of Health (SoH) of a battery is an indicator of its overall condition. It is cal...
1 month 前
已解决
Battery Charge Efficiency Calculation
In a Battery Management System (BMS), the efficiency of battery charging can be estimated using the formula: where: is the...
1 month 前
已解决
Battery Voltage Drop Estimation
In a Battery Management System (BMS), the voltage drop (V_drop) due to the load can be calculated using the formula:V_drop=I×R ...
1 month 前
已解决
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 ...
1 month 前
已解决
State of Charge (SoC) Estimation for a Battery
The State of Charge (SoC) of a battery represents its remaining charge as a percentage. It can be calculated using the formula: ...
1 month 前
已解决
Battery Life Estimation for a Device
A battery-powered device consumes a constant current while operating. The estimated battery life (T) can be calculated using the...
1 month 前
已解决
Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not count...
1 month 前


