Community Profile

David Lusk

Last seen: 3 mesi fa Attivo dal 2022

Content Feed

Visto da

Risolto

middleAsColumn: Return all but first and last element as a column vector
Given input A, return all but the first and last elements, arranged as a column vector. (I.e., all dimensions after the first s...

3 mesi fa

Risolto

Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The values of B are in the same order a...

3 mesi fa

Risolto

Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

3 mesi fa

Risolto

Getting logical indexes
This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

3 mesi fa

Risolto

Find Logic 6

3 mesi fa

Risolto

Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

3 mesi fa

Risolto

Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...

3 mesi fa

Risolto

Find Logic 15

3 mesi fa

Risolto

Find Logic 19

3 mesi fa

Risolto

Find Logic 18

3 mesi fa

Risolto

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...

3 mesi fa

Risolto

Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

3 mesi fa

Risolto

Given a and b, return the sum a+b in c.

3 mesi fa

Risolto

Return area of square
Side of square=input=a Area=output=b

3 mesi fa

Risolto

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...

3 mesi fa

Risolto

Find Logic 3

3 mesi fa

Risolto

Find Logic 4

3 mesi fa

Risolto

Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?

3 mesi fa

Risolto

Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

3 mesi fa

Risolto

Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?

3 mesi fa

Risolto

Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

3 mesi fa

Risolto

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

3 mesi fa

Risolto

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 ...

3 mesi fa

Risolto

Create a vector
Create a vector from 0 to n by intervals of 2.

3 mesi fa

Risolto

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 ...

3 mesi fa

Risolto

Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

3 mesi fa

Risolto

Find max
Find the maximum value of a given vector or matrix.

3 mesi fa

Risolto

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

3 mesi fa

Risolto

Inner product of two vectors
Find the inner product of two vectors.

3 mesi fa

Risolto

Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

3 mesi fa