Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...
約1年 前
解決済み
Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...
Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...
約1年 前
解決済み
Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...
Voltage Divider Calculation
A voltage divider is a simple circuit used to obtain a reduced voltage from a higher voltage source using two resistors in serie...
約1年 前
解決済み
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...
約1年 前
解決済み
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 ...
約1年 前
解決済み
Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...
約1年 前
解決済み
kmph to mps
convert kilometer per hour to meter per second
約1年 前
解決済み
Given area find sides
In a right angle triangle given area 'A'
one arm=x, another arm=2x
then find the value of x.
For example, area A=400 then ...
約1年 前
解決済み
Find max
Find the maximum value of a given vector or matrix.
約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...
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
約1年 前
解決済み
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.
約1年 前
解決済み
MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string.
For example
A='harsa';
b='harish'; result '1'
...
約1年 前
解決済み
Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix
example:
A = [1 2 3]
output = [1 4 9]
metre to feet converter
The idea is to make a converter, which exchange meters to feets.
We use a factor of 1m = 3.281*1f.
so 3m are equals to 9.843 m...
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)