Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


Explode string
Break a sentence into cell of words

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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.

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Risolto


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

circa un anno fa

Carica altro