Solved


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

8 years ago

Solved


The Answer to Life, the Universe, and Everything
A variation of a previous Hitchhiker's Guide to the Galaxy problem. *Inputs:* Life, the Universe, and Everything *Output:*...

8 years ago

Solved


Celsius to Kelvin
Convert Celsius degrees to Kelvin temperature.

8 years ago

Solved


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

8 years ago

Solved


Determine the square root
Determine the square root of the value the user has entered, n.

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

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

8 years ago

Solved


Sorting
Assume that x is an n-by-2 matrix. The aim is to return the first column of x, but sorted according to the second column. Exa...

8 years ago

Solved


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

8 years 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: ...

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

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

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

8 years ago

Solved


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

8 years ago

Solved


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

8 years ago

Solved


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

8 years ago

Solved


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

8 years ago

Solved


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

8 years ago

Solved


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

8 years ago

Solved


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

8 years ago

Solved


Who invented zero?
We know the importance zero in computer science, mathematics... but who invented zero? Clue: He was the first in the line ...

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

8 years ago

Solved


Replace multiples of 5 with NaN
It is required to replace all values in a vector that are multiples of 5 with NaN. Example: input: x = [1 2 5 12 10 7] ...

8 years ago

Solved


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

8 years ago

Solved


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

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

8 years ago

Solved


Back to basics 3 - Temp Directory
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the path to the system's current temp di...

8 years ago

Solved


Back to basics 4 - Search Path
Covering some basic topics I haven't seen elsewhere on Cody. Return a string that is the user's portion of the current search...

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

8 years ago

Solved


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

8 years ago

Load more