Solved

06 - Matrix Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

bijna 5 jaar ago

Solved

Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

bijna 5 jaar ago

Solved

Prime Letters = Removing
Given a string, remove all the letters which in ASCII Code are prime numbers. For Example: s1 = 'Determine which array e...

bijna 5 jaar ago

Solved

Convert a vector into numbers
Suppose a vector x = [ 1 2 4 7] is given. You have to convert this vector into string number y = '1247'. Examples x = [ 1...

bijna 5 jaar ago

Solved

07 - Common functions and indexing 6
Create a variable _m_ as a magic square with the size 6 x 6 Magic squares are defined as square matrices, where the sum of a...

bijna 5 jaar ago

Solved

Generate a NaN...on purpose
The goal is to create a function that will return a single "NaN" without using the nan function. I am interested to see how many...

bijna 5 jaar ago

Solved

Divisible by 4
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

bijna 5 jaar ago

Solved

Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').

bijna 5 jaar ago

Solved

sum of non-primes
The sum of the non-primes below 10 is 1+4+6+8+9+10=38 Find the sum of all the non-primes below the input, N.

bijna 5 jaar 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...

bijna 5 jaar ago

Solved

Back to basics 15 - Benchmark
Covering some basic topics I haven't seen elsewhere on Cody. Return an array of the benchmark values for MATLAB.

bijna 5 jaar ago

Solved

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

bijna 5 jaar ago

Solved

05 - Vector Equations 1
Define the vector _cVec_: <<http://samle.dk/STTBDP/Assignment1_2c.png>> (all the numbers from 5 to -5 in increments of -0....

bijna 5 jaar ago

Solved

04 - Scalar Equations 3
Define the variables a, b, and c: <<http://samle.dk/STTBDP/Assignment1_4-a.png>> <<http://samle.dk/STTBDP/Assignment1_4-b....

bijna 5 jaar ago

Solved

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

bijna 5 jaar ago

Solved

Solve system of equation!
Given provided system of equation, and find x and y. System of equation can be expressed as each term's coefficient. For exam...

bijna 5 jaar 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

bijna 5 jaar ago

Solved

Write a code that will follow the equation y = x * (x + x) * x.
If x = 5, y = 5 * (5+5) * 5 = 250

bijna 5 jaar ago

Solved

Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

bijna 5 jaar ago

Solved

Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

bijna 5 jaar ago

Solved

Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

bijna 5 jaar ago

Solved

03 - Matrix Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3b.png>> A 9x9 matrix of zeros, but with the following v...

bijna 5 jaar ago

Solved

Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

bijna 5 jaar ago

Solved

Matlab Basics - Convert a row vector to a column vector
Write a script to convert a row (e.g. x = [1 2 3]) to a column (e.g. y = [1;2;3]), your script should be able to do this for any...

bijna 5 jaar ago

Solved

Find the mean of two vectors
Take two vectors, and output the mean of them (bonus if you don't use the in-built mean function)

bijna 5 jaar ago

Solved

Divisible by 10
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

bijna 5 jaar ago

Solved

Count decimal digits of a number
* Given an integer number you have to return the number of its digits. * For example 248 has 3 digits and 1589 has 4 digits ...

bijna 5 jaar ago

Solved

Deleting an element in a matrix
For vector Grades=[98 56 78 34 100 88 87], delete the number 78 to get the following matrix Grades=[98 56 34 100 88 87] **re...

bijna 5 jaar ago

Solved

Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

bijna 5 jaar ago

Solved

Divisible by 5
Pursuant to the <http://www.mathworks.com/matlabcentral/cody/problems/42404-divisible-by-2 first problem> in this series, this o...

bijna 5 jaar ago