Ohm’s Law - Calculate Resistance
Ohm’s Law states that resistance R can be calculated as:R=V/I
where:
V is the voltage (in volts)
I is the current (in ampere...
約1年 前
解決済み
Area of a Square
Given the length x of the side of a regular square, find the area of the square, A.
約1年 前
解決済み
Simple Electrical Power Calculation
Calculate the electrical power using the formula:
P=V×I
where:
V is the voltage (in volts)
I is the current (in amperes)
約1年 前
解決済み
Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.
約1年 前
解決済み
Matlab Basics - Rounding I
Write a script to round x DOWN to the next lowest integer:
e.g. x = 2.3 --> x = 2 also: x = 2.7 --> x = 2
約1年 前
解決済み
Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x.
Input:
x = [1, 2, 3, 4, 5, 6] ...