Solved

Create an index-powered vector

Given a input vector x, return y as index-powered vector as shown below. Example x = [2 3 6 9] then y should be [...

fast 3 Jahre ago

Solved

Symmetry of vector

Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

fast 3 Jahre ago

Solved

Create a vector whose elements depend on the previous element

The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

fast 3 Jahre ago

Solved

Determine the number of odd integers in a vector

Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

fast 3 Jahre ago

Solved

Insert zeros into vector

Insert zeros after each elements in the vector. Number of zeros is specified as the input parameter. For example: x = [1 ...

fast 3 Jahre ago

Solved

03 - Matrix Variables 4

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3d.png>> A 3x4 NaN (Not a Number) matrix (Hint: use ...

fast 3 Jahre ago

Solved

Square a Number

Given an input x, return y, which is equal to the square of x.

fast 3 Jahre ago

Solved

Find the dimensions of a matrix

Just find the number of columns of the given matrix. Example x = [1 2 3 4 5 6] y = 2

fast 3 Jahre ago

Solved

The Dark Side of the Die

It is well-known that opposite sides of a classic hexahedral die add to 7. Given a vector of dice rolls, calculate the sum of th...

fast 3 Jahre ago

Solved

Check if equal

Return true if all the elements of an nD array are equal, false otherwise.

fast 3 Jahre ago

Solved

Y=X

Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

fast 3 Jahre ago

Solved

03 - Matrix Variables 3

Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3c.png>> A 10x10 matrix where the numbers from 1 to 100 ...

fast 3 Jahre ago

Solved

Divide by 4

Given the variable x as your input, divide it by four and put the result in y.

fast 3 Jahre ago

Solved

MATLAB Counter

Write a function f = counter(x0,b) to construct a counter handle f that counts with an initial value x0 and a step size b. E...

fast 3 Jahre ago

Solved

Breaking Out of the Matrix

Do you want to take the Red Pill, or the Blue Pill? If you take the Blue Pill, you will simply pass along to the next problem...

fast 3 Jahre ago

Solved

Sums of Multiple Pairs of Triangular Numbers

This is a follow-up to <https://www.mathworks.com/matlabcentral/cody/problems/44289 Problem 44289> - Find two triangular numbers...

fast 3 Jahre ago

Solved

Polarisation

You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

fast 3 Jahre ago

Solved

The Top 5 Primes

This problem series invites you to solve two simple problems related to the integer NUMBER FIVE, in order to celebrate <https://...

fast 3 Jahre ago

Solved

Recaman Sequence - II

Take an arbitrary starting point as input and create Recaman Sequence. Then find the 1, return its index. For example: if n =...

fast 3 Jahre ago

Solved

The Glass Half Full

Identical glasses are placed in a triangular tower structure, such that the top level (L = 1) comprises one glass, the next leve...

fast 3 Jahre ago

Solved

Circle/Pentagon Overlap

Your function will be provided with the five vertices of a pentagon (p) as well as the center point (cp) and radius (r) of a cir...

fast 3 Jahre ago

Solved

Recaman Sequence - I

Recaman Sequence (A005132 - <http://oeis.org/A005132 - OEIS Link>) is defined as follow; seq(0) = 0; for n > 0, seq(n) ...

fast 3 Jahre ago

Solved

Missing five

Convert decimal numbers to a base-9 notation missing the digit *5* <<http://www.alfnie.com/software/missing5.jpg>> Too man...

fast 3 Jahre ago

Solved

Write c^3 as sum of two squares a^2+b^2

write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

fast 3 Jahre ago

Solved

Predicting life and death of a memory-less light bulb

*💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 💡 &...

fast 3 Jahre ago