Questions tagged [triangular]

Use this tag when you have a programmatic problem related to coordinates, area, or any other property of a shape that forms a triangle.

The shape formed by a polygon which has three sides is said to be triangular in nature.

Triangular shape has been discussed, analyzed, formed mathematical formulas around, explained in different contexts since the inception of the idea of geometry.

You can read more about triangular shape and it's properties here.

157 questions
0
votes
1 answer

How to get a Right Triangle's points' coordination in the space?

I have a Right Triangle with equal legs of 1 unit long rotated on 3 individual angles in the space like in the picture below: As could be seen in the picture, the input I have are the angles 'a' and 'b' which rotates the triangle in the space and…
Rojan Gh.
  • 1,062
  • 1
  • 9
  • 32
0
votes
1 answer

Solve a system of equations with a constraint to x in Matlab

I have given a nxn upper triangular matrix R and I want to solve the system of equations Rx=0 where x is a vector of size n. Moreover the lowermost diagonalement of R is 0 (R(n,n)=0). Therefore I want to set x(n)=1. I tried some loops but I do not…
fYpsE
  • 67
  • 6
0
votes
0 answers

triangular distribution for creating four momentum vector

In my problem I am to create a base class to represent a four vector (a concept in physics involving a four dimensional vector) then create a derived class specifically to represent the four momentum of a particle which inherits from the base class.…
daw531
  • 1
0
votes
1 answer

Matlab: how to plot a triangular wave

So I have a Matlab function that creates a series of square impulses, then I apply a noise over them and a filter, the problem is I need to change the form of the impulses into triangular form: x = zeros(1,1000) x(100:200) = 1 x(400:500) =…
user3643483
  • 3
  • 1
  • 3
0
votes
1 answer

Searching a grid recursively by triangular numbers

I have a 36x25 grid of nodes that I wish to search through all triangular numbers from the corner opposite of the hypotenuse. Here's psuedocode for what I was considering, but this method only works until it hits the next corner of the grid, and I'm…
SpiderShlong
  • 224
  • 1
  • 8
0
votes
1 answer

Distance matrix calculation

I hope you will have the right answer to this question, which is rather challanging. I have two uni-dimensional vectors Y and Z, which hold the coordinates of N grid points located on a square grid. So Ny points along Y Nz points along Z N = Ny*Nz Y…
fpe
  • 2,700
  • 2
  • 23
  • 47
0
votes
3 answers

Changing representations: Upper triangular matrix and compact vector (Octave / Matlab)

Given a matrix A, that has zeros on its diagonal and its lower triangular part: A = triu(rand(5,5), 1) % example A = 0.00000 0.47474 0.55853 0.30159 0.97474 0.00000 0.00000 0.03315 0.74577 0.20878 0.00000 0.00000 0.00000 …
Håvard Geithus
  • 5,544
  • 7
  • 36
  • 51
0
votes
1 answer

MATLAB Code for solving desired 'n' number of simultaneous equations of the type Ax = b

Problem in MATLAB Code for solving desired 'n' number of simultaneous equations of the type Ax = b provided that the solving involves the method of upper triangular matrix and the values of A and b are evolved into Aprime and bprime along with the x…
-1
votes
1 answer

Plotting triangles within a hexagon isn't easy

I'm using matplotlib. I managed to plot a 2D array of hexagons using plt.scatter, where I set the marker to 'h' for hexagon and set the size to something big like s=500 or so. Through simple math I made arrays for the position of each hexagon…
Scorp
  • 1
  • 1
-1
votes
2 answers

3 quick for-loop integer homework problems

Have some loops homework to do, and need some help! Here are the 3 questions: Us the method below to take two integers and only output numbers divisible by ten. Make the list start with the largest of the numbers. public static void divisibleByTen(…
-1
votes
1 answer

how to plot a contour for upper triangular matrix in matplotlib?

I want to add a contour plot on my data for z= 0.35, on the scatter plot. here is my data: X Y Z 0.100 0.500 0.455 0.100 1.000 0.453 0.100 1.500 0.451 0.100 2.000…
-1
votes
1 answer

C# Heron - triangles

I'm honestly really stuck and have no idea where to even start with this. I've tried a few different ways of coding this but it comes back with so many errors I'm not sure if I'm even beginning to do it right. The Question is below Write an…
Luna Kitten
  • 1
  • 1
  • 5
-1
votes
1 answer

How to get the adjacent blocks in Floyd triangle?

I need to write a function to find the adjacent blocks in Floyd triangle. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 What is…
bbnn
  • 3,505
  • 10
  • 50
  • 68
-1
votes
1 answer

Find third point with circumcenter and two points of a triangle

How to calculate the third point of the isosceles triangle using JAVA, given its two points and the circumcenter. There will be two solutions for this, and it is sufficient for me if I get the shortest one from the points A and B.
-1
votes
2 answers

Conditional Removal of points from triangular matrix shown by Contour in Matlab

I have big triangular matrix. which has relevant data marked by different colours. I want to remove conditionally the points marked by greenish-yellowish contours: Remove greedily on the area of non-linear objects Remove lazily on the area of…
Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697
1 2 3
10
11