已解决


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

1 year 前

已解决


Calculate sin(x) without sin(x)
Calculate y = sin(x) x = 0 -> y= 0 without the use of sin(x) or cos(x)

1 year 前

已解决


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

1 year 前

已解决


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

1 year 前

已解决


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

1 year 前

已解决


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

1 year 前

已解决


Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

1 year 前

已解决


Weighted average
Compute the weighted average Y, of the vector A, given the weight vector W. The weighted average is the sum of the dot produc...

1 year 前

已解决


Fractal: area and perimeter of Koch snowflake
Starting from an equilateral triangle with side 's', what is the area and perimeter of Koch snowflake at n'th recursive iteratio...

1 year 前

问题


Perimeter of a Koch snowflake
A Koch snowflake is an iteratively generated (fractal) shape built out of successively smaller equilateral triangles by followin...

1 year 前 | 2 | 8 个解题者

已解决


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x2, y...

1 year 前

已解决


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...

1 year 前

已解决


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

1 year 前

已解决


Can we make a triangle?
Given three positive number, check whether a triangle can be made with these sides length or not. remember that in a triangle su...

1 year 前

已解决


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

1 year 前

已解决


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

1 year 前

已解决


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

1 year 前

已解决


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

1 year 前

已解决


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

1 year 前

已解决


Convert a Cell Array into an Array
Given a square cell array: x = {'01', '56'; '234', '789'}; return a single character array: y = '0123456789'

1 year 前

已解决


String Array Basics, Part 1: Convert Cell Array to String Array; No Missing Values
<http://www.mathworks.com/help/matlab/characters-and-strings.html String array> and cell array are two types of containers for s...

1 year 前

已解决


Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....

1 year 前

已解决


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

1 year 前

已解决


Taylor Series
You can use a Taylor series to approximate common functions. The Taylor series for sin(x) is Using only the first several te...

1 year 前

已解决


Calculate Angle From Axis
Given coordinates x and y, an axis ("X" or "Y"), and a direction ("cw" or "ccw", meaning clockwise and counterclockwise, respect...

1 year 前

已解决


Divisible by n, prime vs. composite divisors
In general, there are two types of divisibility checks; the first involves composite divisors and the second prime divisors, inc...

1 year 前

已解决


Divisible by 16
Write a function to determine if a number is divisible by 16. This can be done by a few different methods. Here are two: # If...

1 year 前

已解决


Divisible by 15
Write a function to determine if a number is divisible by 15. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

1 year 前

已解决


Divisible by 14
Write a function to determine if a number is divisible by 14. If a number is <http://www.mathworks.com/matlabcentral/cody/proble...

1 year 前

已解决


Divisible by 13
Write a function to determine if a number is divisible by 13. Similar to the number seven, this can be done by a few different m...

1 year 前

加载更多