Solved


Remove the air bubbles
Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

bijna 8 jaar ago

Solved


Output any real number that is neither positive nor negative
Output any real number that is neither positive nor negative

bijna 8 jaar ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

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

bijna 8 jaar ago

Solved


Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...

bijna 8 jaar ago

Solved


only input
Return the output without writing any code into the function.

bijna 8 jaar ago

Solved


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The *values of B are in the s...

bijna 8 jaar ago

Solved


No Twins?
Write a function that accepts as input a vector and returns the same vector, but retaining only the first occurrence of an eleme...

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

bijna 8 jaar ago

Solved


Geometric series
Find the sum, given the first term t1, the common ratio r, and number of terms n. Examples If input t1=1, r=1, n=7 the...

bijna 8 jaar ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

bijna 8 jaar ago

Solved


Create matrix of replicated elements
Given an input element x, and the dimensions, (m, n) return a matrix of size m x n filled with element x. Example: Input: ...

bijna 8 jaar ago

Solved


While loop with branching
Write a while loop that adjusts userValue while userValue is less than 0 or greater than 80. If userValue is greater than 80, th...

bijna 8 jaar ago

Solved


Back to basics 13 - Input variables
Covering some basic topics I haven't seen elsewhere on Cody. Return as a string the name of the input variable to the functio...

bijna 8 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 8 jaar ago

Solved


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

bijna 8 jaar ago

Solved


Return 'on' or 'off'
When the input is true, return 'on', otherwise, return 'off'.

bijna 8 jaar ago

Solved


Remainder
Make 'y' equal to the remainder of 27 divided by 5. When x=27 and t=5

bijna 8 jaar ago

Solved


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

bijna 8 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 8 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 8 jaar ago

Solved


Logical variables: Running late?
* Assign onTime with true if noTraffic is true and gasEmpty is false.

bijna 8 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 8 jaar ago

Solved


Magic!
Check whether the input matrix is a normal magic square: <http://en.wikipedia.org/wiki/Magic_square> Output the logical va...

bijna 8 jaar ago

Solved


Array resizing: Removing elements
* Remove elements 2, 4, and 6 from row array pendingTasks

bijna 8 jaar ago

Solved


Return elements unique to either input
Given two numeric inputs a and b, return a row vector that contains the numbers found in only a or only b, but not both. For ex...

bijna 8 jaar ago

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 8 jaar 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 ...

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

bijna 8 jaar ago

Solved


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

bijna 8 jaar ago

Load more