Solved

Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

más de 1 año ago

Solved

Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

más de 1 año ago

Solved

Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

más de 1 año ago

Solved

Calculate the integral of the polynomial
for e.g. in = [3 2 1] out = [1 1 1 0]

más de 1 año ago

Solved

Calculate the derivative of a polynomial
Example: in = [ 1 1 1 ] out = [ 2 1 ]

más de 1 año ago

Solved

calculate linear convolution two vectors
for e.g in: a = [1 2 3] b = [4 5 6] out: y = [4 13 28 27 18]

más de 1 año ago

Solved

03 - Matrix Variables 6
Make _fMat_ be a 5x3 matrix of random integers with values from -3 to 3 (Hint: use *randi*)

más de 1 año ago

Solved

Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

más de 1 año ago

Solved

Switch matrix to a column vector
for e.g. x = [1 2 3 4] y = 1 3 2 4

más de 1 año ago

Solved

Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

más de 1 año ago

Solved

Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

más de 1 año ago

Solved

Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

más de 1 año ago

Solved

MATLAB Basic: rounding IV

más de 1 año ago

Solved

Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

más de 1 año ago

Solved

Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

más de 1 año ago

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

más de 1 año ago

Solved

Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

más de 1 año ago

Solved

Box!
Given a box, find the volume of the cube. With each side = a.

más de 1 año ago

Solved

Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

más de 1 año ago

Solved

All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

más de 1 año ago

Solved

High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

más de 1 año ago

Solved

Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

más de 1 año ago

Solved

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

más de 1 año ago

Solved

Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

más de 1 año ago

Solved

Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

más de 1 año ago

Solved

Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

más de 1 año ago

Solved

find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

más de 1 año ago

Solved

Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

más de 1 año 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

más de 1 año ago

Solved

Prime numbers between a , b.
Find all prime number between a & b (including a and b). example: a=100 b=120 y= [101 103 107 109 113]

más de 1 año ago