Solved


Tridiagonal matrix
Given vectors u and v, make a tri-diagonal symmetric matrix such that u is in the main diagonal and v is below and above diagona...

6 years ago

Solved


singularity 2.0 (easier)
If you have been in Cody long enough you have probably run across some badly constructed problems and test suites. This prob...

6 years ago

Solved


how to concatenate matrices
What is the name of the function used to create a matrix C form two matrices A and B, using the syntax: C = [A B]; Outpu...

6 years ago

Solved


Zero
given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

6 years ago

Solved


Return elapsed time
Write a function that returns the amount of time it takes to run the function, as measured by tic and toc. Your answer must be c...

6 years ago

Solved


Distance Between Points
Being n the number of points (If n = 3 there would be 3 points: A, B and C). The distance between each pair of points increases...

6 years ago

Solved


"Power matrix" of two vectors
Given two row vectors x,y of lengths m and n (respectively), create an m x n matrix whose i,j entry is x(i)^y(j).

6 years ago

Solved


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

6 years ago

Solved


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

6 years ago

Solved


write a function to calculate the snr after quantizing the signal in dB
osig : original signal qsig : quantized signal qerror : quantization error HINT: snr = 10×log10(sum(osig × osig)/sum...

6 years ago

Solved


No more zeros
Given an array with zeros at the beginning or at the end, you should get the output without these zeros: input = [zeros(5...

6 years ago

Solved


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

6 years ago

Solved


The maximum sum of squares (testing)
Create a function file with an input maxval to determine the maximum number of terms for the series 1^2 + 2^2 + 3^2 + ... such t...

6 years ago

Solved


Go back n times
You will be given a column vector (such as x = [1; 2; 3; 4; 5; 6]). If (n=3) you will return following; [ 1 NaN NaN NaN ...

6 years ago

Solved


Sum! Sum! Sum!
Calculate the sum of the sequence up to nth term >> a,aa,aaa,aaaa,... 2,22,222,2222,... [for a=2]

6 years ago

Solved


How brilliant are you?
A Brilliant number is defined as a number with two prime factors, both of which have the same number of digits. Some examples: ...

6 years ago

Solved


I'm going to enjoy watching you calculate, Mr Anderson
Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits ...

6 years ago

Solved


Accessing values in a cell
You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in t...

6 years ago

Solved


Get factory-defined property values
Given a property name (e.g. 'AxesUnits', 'LineMarkerSize', 'UicontrolBackgroundColor'), return the factory-defined value for tha...

6 years ago

Solved


List of built-in demo images
Return a cell array containing the filenames for built-in images (e.g. cameraman.tif, coins.png). An optional input specifies wh...

6 years ago

Solved


Find similar/related functions
The _help_ function can be useful for getting quick assistance on a particular function. For most built-in MATLAB functions, a p...

6 years ago

Solved


Check if a directory is on the current MATLAB search path
Given a directory name as a string, return true if the directory is on the current MATLAB search path, and false otherwise.

6 years ago

Solved


Error handling
If the input is a negative number, generate an error. Otherwise, return the number.

6 years ago

Solved


Is this function available?
Sometimes it is difficult to remember which functions are not allowed on the Cody platform. Given a function as a string, return...

6 years ago

Solved


Check if vertices form a rectangle
Given a set of 4 vertices defined by vectors X and Y, return true if the vertices form a rectangle and false otherwise. X and...

6 years ago

Solved


The Python Challenge, Level 1: Decode strings
This problem is based on <http://www.pythonchallenge.com/pc/def/map.html Level 1 of The Python Challenge>, which is just a serie...

6 years ago

Solved


Numeric array to cell array of strings (easy)
Given a numeric array (A) and a 1xk cell array of strings (C), return a cell array (B) that is the same size as A and in which e...

6 years ago

Solved


String math
You will be given a string that describes a simple math equation. Your job is to determine if the value of the equation is equa...

6 years ago

Solved


Create a New_Word
The output of the function is a new word created from the word entered into the function. The new word is created by deleting th...

6 years ago

Solved


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

6 years ago

Load more