Solved

Local Minima

Given a vector of data x, find the values of local minimum that is smaller than its neighbor elements. For example, if x =...

9 days ago

Solved

06 - Matrix Equations 1

Define the vectors _aVec_ and _bVec_ and the matrix _aMat_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http:/...

9 days ago

Solved

07 - Common functions and indexing 5

Create the vector _lin_: <<http://samle.dk/STTBDP/Assignment1_7e.png>> (the integers from 1 to 20) Make every other val...

9 days ago

Solved

07 - Common functions and indexing 4

Define the matrix _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 t...

9 days ago

Solved

07 - Common functions and indexing 3

Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Create the variable _eMat2_, which is equal to _eMat_ with th...

9 days ago

Solved

07 - Common functions and indexing 2

Define _eMat_: <<http://samle.dk/STTBDP/Assignment1_3e.png>> Calculate eMean as the mean across the rows of _eMat_. The an...

9 days ago

Solved

07 - Common functions and indexing 1

Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

9 days ago

Problem

Easy Sequences 39: Perfect Squares in Pascal's Triangle

Consider the 2nd, 3rd and 4th diagonals of the Pascal's Triangle, shown highlighted below: ...

10 days ago | 0 | 4 solvers

Solved

Count ones

Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

11 days ago

Solved

How unique?

Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

11 days ago

Solved

Half-Swap

Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

11 days ago

Solved

is the number happy?

test is a given integer number is Happy of not? answer 1 if yes or 0 is no

11 days ago

Solved

Signed Magnitude

For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

12 days ago

Solved

Add a row of zeros on top of a matrix

Given a matrix, insert a row of zeros as the top row.

12 days ago

Solved

Check if equal

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

12 days ago

Solved

index of n^2 in magic(n)

input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

13 days ago

Solved

List the cuban primes

The number 61 is a cuban prime because it is prime and the difference two cubes, 64 and 125. Write a function to list the cuba...

13 days ago

Solved

Number Persistence

A number's persistence is the number of steps required to reduce it to a single digit by multiplying all its digits to obtain a ...

13 days ago

Solved

Reverse within string

If input is a string 'yellow' the output should be 'leywol'. Locate the middle of the string and reverse the first (yel) and sec...

13 days ago

Solved

Replace odd number in given matrix by zero

Replace the odd numbers in a given matrix with zero. Example A = [ 17 24 1 8 15 23 5 7 ...

13 days ago

Solved

Solving Quadratic Equations (Version 2)

Before attempting this problem, solve version 1: <https://www.mathworks.com/matlabcentral/cody/problems/2510-solving-quadratic-...

13 days ago

Solved

Powers Of

Fill the vector with powers of 2, so that vector(1) is 2^1, vector(2) is 2^2, etc. Stop with vector(10). Complete the function ...

13 days ago

Solved

Generate vector according to sign of vector

Generate vector according to sign of vector Example: If A=[-2 0 5] then output must be[-1 0 1] meaning that for negative n...

13 days ago

Solved

Building matrices

If you have matrix A, create matrix B using matrix A as an "element" A = [1 2 3 4; 5 6 7 8...

13 days ago

Solved

Replacing a row

For matrix G=[1 2 3; 4 5 6; 7 8 9] Replace the 2nd row with 8s **remember to create matrix G

13 days ago