Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.
28日 前
解決済み
High Five!
Write a function that takes a number x and returns y = 'High Five' if x is not equal to five. Return y = 'Denied' if the number ...
28日 前
解決済み
A Five Introduction
Write a function that takes a number x as an input and returns the same value as y, unless x = 5, in which case the function sho...
28日 前
解決済み
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...
28日 前
解決済み
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...
28日 前
解決済み
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...
28日 前
解決済み
Battery Charge Efficiency Calculation
In a Battery Management System (BMS), the efficiency of battery charging can be estimated using the formula:
where:
is the...
28日 前
解決済み
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
...
28日 前
解決済み
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 ...
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4
So if n = 3, then return
[1 2 2 3 3 3]
And if n = 5, then return
[1 2 2 3 3 3 4...
約1ヶ月 前
解決済み
Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so:
x = [1 2 3 4]
Commas are optional, s...
約1ヶ月 前
解決済み
Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the numbers. Otherwise return false.
Example...