Don't Include a Five (Part Two)
Given a vector A with at least one non-five, return vector B, with all fives excluded (not replaced by zeros).
2ヶ月 前
解決済み
Don't Include a Five
Given a vector A, return vector B with all 5s replaced with 0s.
2ヶ月 前
解決済み
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 ...
2ヶ月 前
解決済み
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...
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...
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...
2ヶ月 前
解決済み
Battery Charge Efficiency Calculation
In a Battery Management System (BMS), the efficiency of battery charging can be estimated using the formula:
where:
is the...
2ヶ月 前
解決済み
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
...
2ヶ月 前
解決済み
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 ...
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...
2ヶ月 前
解決済み
Swap the input arguments
Write a two-input, two-output function that swaps its two input arguments. For example:
[q,r] = swap(5,10)
returns q = ...
2ヶ月 前
解決済み
Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.
2ヶ月 前
解決済み
Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.
2ヶ月 前
解決済み
Make a random, non-repeating vector.
This is a basic MATLAB operation. It is for instructional purposes.
---
If you want to get a random permutation of integer...
2ヶ月 前
解決済み
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...
Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...