Gelöst


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


Add two numbers
Add two numbers (For beginners)

etwa 12 Jahre vor

Gelöst


02 - Vector Variables 2
Make the following variable: <<http://samle.dk/STTBDP/Assignment1_2b.png>>

etwa 12 Jahre vor

Gelöst


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

etwa 12 Jahre vor

Gelöst


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

etwa 12 Jahre vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

etwa 12 Jahre vor

Gelöst


Negative matrix
Change the sign of all elements in given matrix.

etwa 12 Jahre vor

Gelöst


sum of first 'n' terms
Given n=10, find the sum of first 'n' terms Example: If n=10, then x=1,2,3,4,5,6,7,8,9,10. The sum of these n=10 terms is 55...

etwa 12 Jahre vor

Gelöst


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

etwa 12 Jahre vor

Gelöst


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

etwa 12 Jahre vor

Gelöst


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

etwa 12 Jahre vor

Gelöst


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero ...

etwa 12 Jahre vor

Gelöst


DC chopper
Input x is the sampled signal vector, may have both AC and DC components. output vector y should have AC components removed then...

etwa 12 Jahre vor

Gelöst


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

etwa 12 Jahre vor

Gelöst


Will there be a new leader?
Simply answer the title.

etwa 12 Jahre vor

Gelöst


Remove white space from the string
Remove the white spaces (trailing and leading) from the input variable

etwa 12 Jahre vor

Gelöst


Magic is simple (for beginners)
Determine for a magic square of order n, the magic sum m. For example m=15 for a magic square of order 3.

etwa 12 Jahre vor

Gelöst


Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...

etwa 12 Jahre vor

Gelöst


Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...

etwa 12 Jahre vor

Gelöst


Determine if a Given Number is a Triangle Number
*Description:* Determine if the elements of an input array are triangle numbers and return the result as an array with the sa...

etwa 12 Jahre vor

Gelöst


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

etwa 12 Jahre vor

Gelöst


Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...

etwa 12 Jahre vor

Gelöst


Celsius to Fahrenheit converter
Convert Celsius to Fahrenheit degrees.

etwa 12 Jahre vor

Gelöst


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

etwa 12 Jahre vor

Gelöst


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

etwa 12 Jahre vor

Gelöst


Is this matrix orthogonal?
Given a square matrix, a, determine whether it is orthogonal. INPUT: a, a n x n matrix OUTPUT: true or false

etwa 12 Jahre vor

Mehr laden