Solved


Remove the Zero
Given an array n, remove all zeros

4 years ago

Solved


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

4 years ago

Solved


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

4 years ago

Solved


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

4 years ago

Solved


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

4 years ago

Solved


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

4 years ago

Solved


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

4 years ago

Solved


Matlab Basics - Pick out parts of a vector
Consider x a vector of length >= 7 (there are at least 7 elements in the vector, write a script that extracts the 2nd element, a...

4 years ago

Solved


Love triangles
Given a vector of lengths [a b c], determines whether a triangle with non-zero area (in two-dimensional Euclidean space, smarty!...

4 years ago

Solved


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

4 years ago

Solved


convert matrix to single column
given any matrix, convert it to single column

4 years ago

Solved


Summation of array
Given an array, Find the sum of all of the elements in it Examples: Input x = [1 2 3 5; 4 5 6 7]; Output y is 33

4 years ago

Solved


Positive Infinity
Round the array a towards positive infinity

4 years ago

Solved


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

4 years ago

Solved


Array of Ones
Create a 100 X 100 array of ones.

4 years ago

Solved


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

4 years ago

Solved


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

4 years ago

Solved


Back to basics 7 - Equal NaNs
Covering some basic topics I haven't seen elsewhere on Cody. Given 2 input variables, output true if they are equal, false ot...

4 years ago

Solved


length of a vector
Find twice the length of a given vector.

4 years ago

Solved


Pentagonal Numbers
Your function will receive a lower and upper bound. It should return all pentagonal numbers within that inclusive range in ascen...

4 years ago

Solved


Vectors counting by 2
Create a vector numbers from 7 to 15 in increments of 2

4 years ago

Solved


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

4 years ago

Solved


Pascal's Triangle
Given an integer n >= 0, generate the length n+1 row vector representing the n-th row of <http://en.wikipedia.org/wiki/Pascals_t...

4 years ago

Solved


Negative Infinity
Round the given array a towards negative infinity.

4 years ago

Solved


Counting down
Create a vector that counts from 450 to 200 in increments of 10.

4 years ago

Solved


Swap two numbers
Example Input: a = 10 b = 20 Output a = 20 b = 10

4 years 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

4 years ago

Solved


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

4 years ago

Solved


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

4 years ago

Solved


Predicting life and death of a memory-less light bulb
*&#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &#128161 &...

4 years ago

Load more