문제를 풀었습니다


Create logical matrix with a specific row and column sums
Given two numbers *|n|* and *|s|*, build an |n-by-n| logical matrix (of only zeros and ones), such that both the row sums and th...

거의 5년 전

문제를 풀었습니다


Great Circle Distance
Find shortest between two points on a ball given their azimuthal and polar angles (in degrees) as well as the radius of the sphe...

거의 5년 전

문제를 풀었습니다


Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

거의 5년 전

문제를 풀었습니다


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

거의 5년 전

문제를 풀었습니다


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

거의 5년 전

문제를 풀었습니다


Smallest distance between a point and a rectangle
Given two points *x* and *y* placed at opposite corners of a rectangle, find the minimal euclidean distance between another poin...

거의 5년 전

문제를 풀었습니다


Similar Triangles - find the height of the tree
Given the height, h1, of a power pole, shorter than a tree, a given distance, x2 away, please find h2, height of the tree. Pleas...

거의 5년 전

문제를 풀었습니다


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

거의 5년 전

문제를 풀었습니다


Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


Find third Side of a right triangle given hypotenuse and a side. No * - or other functions allowed
Find the remaining side of a triangle given the hypotenuse and a side. However, the normal functions and symbols are not allowe...

거의 5년 전

문제를 풀었습니다


Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

거의 5년 전

문제를 풀었습니다


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

거의 5년 전

문제를 풀었습니다


ASCII Birthday Cake
Given an age and a name, give draw an ASCII birthday cake. For example, given the name "CODY" and the age 5, return a string wit...

거의 5년 전

문제를 풀었습니다


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

거의 5년 전

문제를 풀었습니다


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

거의 5년 전

답변 있음
matrix manipulation - replacing partial matrix subsets in main matrix ???
You can use colon indexing: % Create the two matrices in your example A = ones(3, 5); B = 2 * ones(2, 2); % Use indexing t...

거의 5년 전 | 1

| 수락됨

답변 있음
Reduce trailing zeros of text file
Here's how you use fprintf to export two integer columns followed by three floating point columns: % Create array with 5 column...

거의 5년 전 | 1

| 수락됨

답변 있음
Execute command if timer runs out
A timer object might work: % Define callback callback = @(x,y)disp('hello world'); % Create timer; this will execute TimerF...

거의 5년 전 | 0

| 수락됨

답변 있음
how to set graph size
I'd use daspect to change the aspect ratio of your axes: % Create plot vectors x = [0, 1, 2]; y = [1, 0, 0]; % Plot plot(...

거의 5년 전 | 0

| 수락됨

답변 있음
Tracing boundary in RGB image
You just want the outlines of the colored regions stored in another image, right? You can use the gradient function: % Convert...

거의 5년 전 | 0

답변 있음
Pass GUI information to another GUI depending on a condition
I don't usually use GUIDE, so forgive me if I explain something that GUIDE takes care of automatically. You'll probably want th...

거의 5년 전 | 0

| 수락됨

답변 있음
Geometry question for a pong game
One obvious problem (might be a typo), when you assign _theta_ you use _atan2d_, which returns an angle in degrees, and _atan_, ...

6년 초과 전 | 0

답변 있음
I need to remove some data points from a matrix and then use these points in a function? how would i do this? The matrix is 3x1470, each column refers to XYZ and i am looking to remove all points within a certain radius from the centre.
Here's how to do it using bsxfun: % I'll define 1000 random points in a 100 x 100 x 100 cube (in your case, % you'll jus...

6년 초과 전 | 0

답변 있음
How to display info with mouse over text region inside a figure
Actually, it's not hard at all. MATLAB's pointer manager lets you assign functions to be called whenever the mouse pointer enter...

6년 초과 전 | 3

문제를 풀었습니다


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

대략 7년 전

문제를 풀었습니다


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

대략 7년 전

문제를 풀었습니다


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

대략 7년 전

문제를 풀었습니다


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

대략 7년 전

문제를 풀었습니다


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

대략 7년 전

더 보기