Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1.
Hint: use increment.
4ヶ月 前
解決済み
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 ...
4ヶ月 前
解決済み
Create a vector
Create a vector from 0 to n by intervals of 2.
4ヶ月 前
解決済み
Flip the vector from right to left
Flip the vector from right to left.
Examples
x=[1:5], then y=[5 4 3 2 1]
x=[1 4 6], then y=[6 4 1];
Request not to use d...
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...
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...
4ヶ月 前
解決済み
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...
How many jokers?
* Given DNA codes of a group of suspects,
* and a code for certain types of jokers,
* Count how many jokers of that type.
* ...
4ヶ月 前
解決済み
Mesh the tetrahedron
Problem statement
An tetrahedron is a regular polyhedron with 4 vertices and 4 triangular faces. It is also one of the five w...
4ヶ月 前
解決済み
Mesh the cube
Problem statement : mesh the cube with quadranglar / squared faces
An cube / regular hexahedron is a regular polyhedron with ...
4ヶ月 前
解決済み
Mesh the octahedron
Problem statement
An octahedron is a regular polyhedron with 6 vertices and 8 triangular faces. It is also one of the five we...
4ヶ月 前
解決済み
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...
4ヶ月 前
解決済み
Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...
4ヶ月 前
解決済み
Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x.
<<https://i.imgur.com/jlZDHhq.png>>
Image courtesy of <http://up...
4ヶ月 前
解決済み
Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x?
<<https://i.imgur.com/jlZDHhq.png>>
...
4ヶ月 前
解決済み
Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y?
<<https://imgur.com/x6hT6mm.png>>
...
4ヶ月 前
解決済み
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".
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...
4ヶ月 前
解決済み
LED Current Calculation
In an electrical circuit, the current (III) flowing through an LED is determined using Ohm’s Law:
Where:
I is the current ...