Solved

Is the input divisible by 3?

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

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

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

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

5 years ago

Solved

Check to see if a Sudoku Puzzle is Solved

*Description:* Your task, should you choose to accept it, is to make a function that checks to see if a 9x9 matrix of integer...

5 years ago

Solved

Given two strings, find the maximum overlap

Given two strings s1 and s2, create a new string s3 which is as short as possible and contains both strings. If s1 = [1 2...

5 years ago

Solved

Function definition: BMI calculator

Define a function CalculateBMI with inputs massKg and heightCm. The function returns bodyMassIndex. The function should be able ...

5 years ago

Solved

Getting logical indexes

This is a basic MATLAB operation. It is for instructional purposes. --- Logical indexing works like this. thresh = 4...

5 years ago

Solved

Rotate and display numbered tile

Imagine a square tile with four numbers on it, one on each edge. We will call these edges north, east, south, and west. If th...

5 years ago

Solved

Calculate the Levenshtein distance between two strings

This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...

5 years ago

Solved

Logarithm with base other than 'e'

Standard log() function returns natural logarithm with base equal to Euler constant. Compute logarithm for a given base.

5 years ago

Solved

Find the sum of the negative elements under the main diagonal.

Example Input A=[1 2; -3 0] Output -3

5 years ago

Solved

Zero padding

Create y = {'01';'02';'03';'04';'05';'06';'07';'08';'09';'10'} from x = 1:10

5 years ago

Solved

Get derivarive of polynomial given as vector array.

Get derivarive of polynomial given as vector array. Example p=[ 1 2 0 5 0 3 ]; result=[ 5 8 0 10 ...

5 years ago

Solved

Calculate roots of polynomial given as vector array.

Calculate roots of polynomial given as vector array. Example x=[1 2 0 5 0 3] result=[-2.7267 ; ...

5 years ago

Solved

Check if a string starts with another string

Input s='He was so tired' q='He' Output ans = true

5 years ago

Solved

Create cotangent function out of sine.

Please, don't use cos, tan, cot matlab functions.

5 years ago

Solved

Return the length of the longest word in the string.

Example: Input s='A fractal is a natural phenomenon or a mathematical set that exhibits a repeating pattern that display...

5 years ago

Solved

Logical operators: Flipping bits

The xor operator will toggle the bit if the bit is xored with 1. Ex: 1 XOR 0 = 1, 1 XOR 1 = 0. The xor operator will retain th...

5 years ago

Solved

Read a Soroban Abacus

*Description* The Soroban is the name of the modern Japanese abacus. Information on reading a Soroban can be found <http://we...

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

5 years ago

Solved

Find perfect placement of non-rotating dominoes (easier)

Given a list of ordered pairs, find the order they should be placed in a line, such that the sum of the absolute values of the d...

5 years 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

5 years ago

Solved

Which quadrant?

Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

5 years ago

Solved

Return 'on' or 'off'

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

5 years ago

Solved

How long is the longest prime diagonal?

Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

5 years ago