已解决


Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

19 days 前

已解决


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

19 days 前

已解决


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

19 days 前

已解决


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

19 days 前

已解决


Airline Ticket Mod7 Checksum
There are 13 digits in an airline ticket number. If an airline ticket number is valid, the 13th digit should be the remainder of...

19 days 前

已解决


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

19 days 前

已解决


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

20 days 前

已解决


Let's get back to school, and create multiplication tables
For a given range, create multiplication tables. (start is always < endno) Example start = 17 endno = 19 Then, ...

20 days 前

已解决


Subtract integers and add doubles
Create a function that subtracts a from b if a and b are integers and adds them if they are floats.

20 days 前

已解决


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

20 days 前

已解决


Radiation Heat Transfer — View Factors (4)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

20 days 前

已解决


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...

20 days 前

已解决


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

20 days 前

已解决


Find the sines of an isosceles triangle when given its area and height
Find the sines of an isosceles triangle when given its area and height. For example, when A=12 and h=4, the result is [0.8 0.8 ...

20 days 前

已解决


Minimal cost
A power house, P, is on one bank of a straight river W meters wide, and a factory, F, is on the opposite bank L meters downstrea...

20 days 前

已解决


Acid and water
&#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; &#9878; Assume that there is a 100 liter tank. It is initially fi...

24 days 前

已解决


Birthday cake
It's Cody's 5th birthday, and you've been tasked with putting the candles on the cake. Your goal is to maximize the distance bet...

24 days 前

已解决


Easy Sequences 16: Volume of Embedded Octahedron
An octahedron (not regular) is formed by joining the centers of the faces of a rectangular parallelepiped (see below figure). ...

25 days 前

已解决


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

25 days 前

已解决


Pandigital Factors (Based on Euler 491)
A Pandigital Number is a number containing all of the digits from 0-9 inclusive, with the added stipulation that it does not hav...

25 days 前

已解决


Pseudo Square Root (Inspired by Project Euler 266)
Shamelessly copied from the Project Euler page for Problem 266: ------------- The divisors of 12 are: 1,2,3,4,6 and 12. T...

26 days 前

已解决


There are 10 types of people in the world
Those who know binary, and those who don't. The number 2015 is a palindrome in binary (11111011111 to be exact) Given a year...

26 days 前

已解决


Make a Plot with Functions
Make a plot and test

26 days 前

已解决


Chess probability
The difference in the ratings between two players serves as a predictor of the outcome of a match (the <http://en.wikipedia.org/...

27 days 前

已解决


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

27 days 前

已解决


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.

27 days 前

已解决


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]

27 days 前

已解决


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

27 days 前

已解决


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

27 days 前

已解决


Return area of square
Side of square=input=a Area=output=b

27 days 前

加载更多