Statistik
0 Probleme
113 Lösungen
RANG
N/A
of 300.946
REPUTATION
N/A
BEITRÄGE
0 Fragen
0 Antworten
ANTWORTZUSTIMMUNG
0.00%
ERHALTENE STIMMEN
0
RANG
of 21.119
REPUTATION
N/A
DURCHSCHNITTLICHE BEWERTUNG
0.00
BEITRÄGE
0 Dateien
DOWNLOADS
0
ALL TIME DOWNLOADS
0
BEITRÄGE
0 Beiträge
BEITRÄGE
0 Öffentlich Kanäle
DURCHSCHNITTLICHE BEWERTUNG
BEITRÄGE
0 Discussions
DURCHSCHNITTLICHE ANZAHL DER LIKES
Feeds
Gelöst
Project Euler: Problem 1, Multiples of 3 and 5
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...
mehr als 2 Jahre vor
Gelöst
Sum of series III
What is the sum of the following sequence: Σ(2k-1)^3 for k=1...n for different n?
mehr als 2 Jahre vor
Gelöst
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.
mehr als 2 Jahre vor
Gelöst
Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?
mehr als 2 Jahre vor
Gelöst
the average value of the elements
Calculate the average value of the elements in the array
mehr als 2 Jahre vor
Gelöst
Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...
mehr als 2 Jahre vor
Gelöst
Sum of series I
What is the sum of the following sequence: Σ(2k-1) for k=1...n for different n?
mehr als 2 Jahre vor
Gelöst
Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...
mehr als 2 Jahre vor
Gelöst
Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.
mehr als 2 Jahre vor
Gelöst
Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5
mehr als 2 Jahre vor
Gelöst
Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...
mehr als 2 Jahre vor
Gelöst
Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1
mehr als 2 Jahre vor
Gelöst
Sum of diagonal of a square matrix
If x = [1 2 4; 3 4 5; 5 6 7] then y should be the sum of the diagonals of the matrix y = 1 + 4 + 7 = 12
mehr als 2 Jahre vor
Gelöst
Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];
mehr als 2 Jahre vor
Gelöst
Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...
mehr als 2 Jahre vor
Gelöst
Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...
mehr als 2 Jahre vor
Gelöst
How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...
mehr als 2 Jahre vor
Gelöst
radius of a spherical planet
You just measured its surface area, that is the input.
mehr als 2 Jahre vor
Gelöst
The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".
mehr als 2 Jahre vor
Gelöst
Simple equation: Annual salary
Given an hourly wage, compute an annual salary
mehr als 2 Jahre vor
Gelöst
Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0
mehr als 2 Jahre vor
Gelöst
Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...
mehr als 2 Jahre vor
Gelöst
The Goldbach Conjecture
The Goldbach conjecture asserts that every even integer greater than 2 can be expressed as the sum of two primes. Given the eve...
mehr als 2 Jahre vor
Gelöst
Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...
mehr als 2 Jahre vor
Gelöst
Find the longest sequence of 1's in a binary sequence.
Given a string such as s = '011110010000000100010111' find the length of the longest string of consecutive 1's. In this examp...
mehr als 2 Jahre vor
Gelöst
Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...
mehr als 2 Jahre vor
Gelöst
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2 3 3 3 4...
mehr als 2 Jahre vor



