Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...
2ヶ月 前
解決済み
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...
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ヶ月 前
解決済み
Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle.
<<https://i.imgu...
Calculate Parallel Resistance
Three resistors connected in parallel have resistances R1, R 2, and R 3, respectively. Return the total resistance R total of ...
2ヶ月 前
解決済み
Resistance of a light bulb
The current through two identical light bulbs connected in series is C Amperes. The total voltage across both bulbs is V Volts....
2ヶ月 前
解決済み
free points
function y = your_fcn_name(x)
y = x(1)+x(2);
end
2ヶ月 前
解決済み
Binary
Given a positive, integer n, create a function that returns the respective binary number in the form of a vector.
Example:
...
2ヶ月 前
解決済み
Binary Coder
Take an input number and print the binary value of this number.
2ヶ月 前
解決済み
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:*
Many important observations in math and science can be described by short, but powerful, equations...