Solved

Is the input divisible by 3?

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

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

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

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

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

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

circa 5 anni ago

Solved

Function definition: BMI calculator

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

circa 5 anni ago

Solved

Getting logical indexes

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

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

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

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

circa 5 anni ago

Solved

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

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

circa 5 anni ago

Solved

Zero padding

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

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

circa 5 anni 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 ; ...

circa 5 anni ago

Solved

Check if a string starts with another string

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

circa 5 anni ago

Solved

Create cotangent function out of sine.

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

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

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

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

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

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

circa 5 anni 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

circa 5 anni ago

Solved

Which quadrant?

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

circa 5 anni ago

Solved

Return 'on' or 'off'

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

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

circa 5 anni ago