Solved


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

3 months 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...

3 months ago

Solved


03 - Matrix Variables 1
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_3a.png>> A 9x9 matrix full of 2's (Hint: use *ones* o...

3 months ago

Solved


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

3 months ago

Solved


Remove the polynomials that have positive real elements of their roots.
The characteristic equation for a dynamic system is a polynomial whose roots indicate its behavior. If any of the <http://www.ma...

3 months ago

Solved


Convert a vector into a number
This is a sub problem related to this problem: <http://www.mathworks.com/matlabcentral/cody/problems/621-cryptomath-addition>...

3 months ago

Solved


Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody. Return the largest positive floating-point number MATLAB can han...

3 months ago

Solved


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

3 months ago

Solved


Find state names that start with the letter N
Given a list of US states, remove all the states that start with the letter N. If s1 = 'Alabama Montana Nebraska Vermont Ne...

3 months ago

Solved


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

3 months 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...

3 months 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!...

3 months ago

Solved


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

3 months ago

Solved


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

3 months ago

Solved


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

3 months ago

Solved


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

3 months 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...

3 months ago

Solved


Who is the smartest MATLAB programmer?
Who is the smartest MATLAB programmer? Examples: Input x = 'Is it Obama?' Output = 'Me!' Input x = 'Who ?' Ou...

3 months ago

Solved


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

3 months ago

Solved


Remove the small words from a list of words.
Your job is to tidy up a list of words that appear in a string. The words are separated by one or more spaces. Remove all words ...

3 months ago

Solved


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

3 months ago

Solved


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

3 months ago

Solved


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

3 months ago

Solved


It dseon't mettar waht oedrr the lrettes in a wrod are.
An internet meme from 2003 (read more <http://www.snopes.com/language/apocryph/cambridge.asp here>) asserted that readers are re...

3 months ago

Solved


Reverse the elements of an array
Reverse the order of elements in an array: eg: input X = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] o...

3 months ago

Solved


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

3 months ago

Solved


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

3 months ago

Solved


Renaming a field in a structure array
MATLAB has a <http://www.mathworks.com/help/techdoc/ref/setfield.html setfield> and a <http://www.mathworks.com/help/techdoc/ref...

3 months ago

Solved


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

3 months ago

Solved


Create a vector
Create a vector from 0 to n by intervals of 2.

3 months ago

Load more