Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for:
A = [ 1 5 8 ]
then
B = [ 1 1 5 ...
5개월 전
문제를 풀었습니다
Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
5개월 전
문제를 풀었습니다
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10
5개월 전
문제를 풀었습니다
Matlab Basics - Switching Assignments
Switch assignments for variables x and y, for example
start with x = 1 and y = 3
end with y = 1 and x = 3
Do NOT simply r...
5개월 전
문제를 풀었습니다
Swap between columns
The idea is to swap between second and second last column
Ex = [1 2 3 4 5;
1 2 3 4 5;
1 2 3 4 5;
1 2 3 4 5;
...
5개월 전
문제를 풀었습니다
Swap between first and last
The idea is to swap between first and last row
Ex = [1 2 3 4 5;
1 2 3 4 5;
1 2 3 4 5;
1 2 3 4 5;
...
5개월 전
문제를 풀었습니다
Swap between first and last column
The idea is to swap between first and last column
Ex = [1 2 3 4 5;
1 2 3 4 5;
1 2 3 4 5;
1 2 3 4 5;
1 2 3 ...
5개월 전
문제를 풀었습니다
Swap between rows
The idea is to swap between second and second last row
Ex = [1 2 3 4 5;
5 4 3 2 1;
1 2 3 4 5;
1 2 3 4 5;
...
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...
5개월 전
문제를 풀었습니다
Battery Charge Efficiency Calculation
In a Battery Management System (BMS), the efficiency of battery charging can be estimated using the formula:
where:
is the...