Gelöst


Project Euler: Problem 8, Find largest product in a large string of numbers
Find the greatest product of five consecutive digits in an n-digit number. 73167176531330624919225119674426574742355349194934...

etwa 9 Jahre vor

Gelöst


Four quadrant inverse tangent function.
Create a function that returns an array P the same size as X and Y containing the element-by-element, four-quadrant inverse tang...

etwa 9 Jahre vor

Gelöst


Make a function that returns its own character count
Write a function that returns a 128 element vector with an accurate inventory of the ASCII characters in its own function file. ...

etwa 9 Jahre vor

Gelöst


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime nu...

etwa 9 Jahre vor

Gelöst


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

etwa 9 Jahre vor

Gelöst


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

etwa 9 Jahre vor

Gelöst


newRMS
find root mean square of a signal x in less time than the test code and accurate to six places.

etwa 9 Jahre vor

Gelöst


Project Euler: Problem 4, Palindromic numbers
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 ...

etwa 9 Jahre vor

Gelöst


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

etwa 9 Jahre vor

Gelöst


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

etwa 9 Jahre vor

Gelöst


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

etwa 9 Jahre vor

Gelöst


Differential equations I
Given a function handle |f| an initial condition |y0| and a final time |tf|, solve numerically the differential equation dy...

etwa 9 Jahre vor

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

etwa 9 Jahre vor

Gelöst


Fizz Buzz
Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

etwa 9 Jahre vor

Gelöst


Math with Roman Numerals
Given a function R within (+,-,*,/) and two Roman numerals a & b, compute aRb in Roman numerals.

etwa 9 Jahre vor

Gelöst


What are the odds?
Two numbers, A and B are drawn randomly and uniformly on [-R,R]. What is the probability that A*B < A+B. Your function should ...

etwa 9 Jahre vor

Gelöst


ベクトル [1 2 3 4 5 6 7 8 9 10] の作成
MATLABでは,角括弧の中に要素を入れることで、ベクトルを作成できる。 x = [1 2 3 4] また次のようにも書ける(コンマはオプション)。 x = [1, 2, 3, 4] 問題:次のベクトルを出力する関数を作成せよ。...

etwa 9 Jahre vor

Gelöst


2倍してみよう - ここからスタート!
初めにこの問題を試してみよう。 入力としてxを与え、それを2倍して結果をyに代入せよ。 Examples: Input x = 2 Output y is 4 Input x = 17 Output y is 34 ...

etwa 9 Jahre vor

Gelöst


Subdivide the Segment
Two points, P1 and P2, with integer x-y coordinates are given. These uniquely determine a third point, P0, on the extended line...

etwa 9 Jahre vor

Gelöst


pressure to dB?
given x ratio of pressure, find corresponding y dB

mehr als 9 Jahre vor

Gelöst


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

mehr als 9 Jahre vor

Gelöst


Boolean algebra
Your contractor from Elbonia has sent you the prototype of the new logical unit. It turns out that the only logical relation it ...

mehr als 9 Jahre vor

Gelöst


Signal filtering
You are given a vector, containing a superposition of target signal and white gaussian noise. Return a vector, containing the es...

mehr als 9 Jahre vor

Gelöst


Is this date a palindrome?emordnilap a etad siht sI
Take a MATLAB date number as input, and return true if the date is a palindrome, false if the date is not a palindrome. A date ...

mehr als 9 Jahre vor

Gelöst


Filter values in a vector
Cody often benefits from a functional style of programming. For example, your score is often better when you compose multiple fu...

mehr als 9 Jahre vor

Gelöst


Create a dictionary
The goal is to write a function that returns a dictionary from a list of words or phrases and their definitions. Here is an exam...

mehr als 9 Jahre vor

Gelöst


hackathon impossible
You might have found a solution to our <http://www.mathworks.com/matlabcentral/cody/problems/205-hackathon-the-beginnings previo...

mehr als 9 Jahre vor

Gelöst


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

mehr als 9 Jahre vor

Gelöst


yet another flying fly (YAFF)
Same as the previous problem <http://www.mathworks.com/matlabcentral/cody/problems/203-fly-fly-away fly fly away> but now with *...

mehr als 9 Jahre vor

Gelöst


fly fly away
A fly moves following a predefined sequence of discrete jumps (defined by the vectors _dx_ and _dy_) repeating the same sequence...

mehr als 9 Jahre vor

Mehr laden