Articles on Trending Technologies

Technical articles with clear explanations and examples

Different Aggregation functions in SAP HANA

SAP ABAP Expert
SAP ABAP Expert
Updated on 17-Jun-2020 1K+ Views

In a general scenario, it is advisable to store the table as Column store when you have to run complex OLAP queries. OLAP queries include complex calculations and different SQL aggregation functions are used in the query.Select Sum(Sales) from table_name where Column1=’ABC’; Aggregate Functions include −Sum() - returns the sum of the numeric values in a given columnMax() - returns the maximum of the numeric values in a given columnMin() - returns the minimum of the numeric values in a given columnAverage() - returns the average of the numeric values in a given columnPercent() - returns the percentage of the numeric ...

Read More

Check if two given sets are disjoint?

George John
George John
Updated on 17-Jun-2020 878 Views

Two sets are disjoint set when they have no common elements. In other words, if we get the intersection of two sets, then we will get null set.The method is simple, in this algorithm, two sets are given. We assume that both sets are already sorted, items are compared between two sets. when there is a match, then it is not a disjoint set, when no items are matched, they are disjoint sets.Input and OutputInput: Two sets: set1: {15, 12, 36, 21, 14} set2: {7, 89, 56, 32} Output: Both sets are disjointAlgorithmisDisjoint(set1, set2)Input: Two sets.Output: True when both sets ...

Read More

Check whether a given point lies inside a Triangle

Ankith Reddy
Ankith Reddy
Updated on 17-Jun-2020 3K+ Views

Three points of a triangle are given; another point P is also given to check whether the point P is inside the triangle or not.To solve the problem, let consider the points of the triangle are A, B, and C. When the area of triangle Δ𝐴𝐵𝐶 = Δ𝐴𝐵𝑃 + Δ𝑃𝐵𝐶 + Δ𝐴𝑃𝐶, then the point P is inside the triangle.Input and OutputInput: Points of the triangle {(0, 0), (20, 0), (10, 30)} and point p (10, 15) to check. Output: Point is inside the triangle.AlgorithmisInside(p1, p2, p3, p)Input: Three points of a triangle, the point p to check.Output: True, when ...

Read More

Requirements to use a text join in SAP HANA

SAP Developer
SAP Developer
Updated on 17-Jun-2020 323 Views

When you use a Text join in SAP HANA, following condition should be met −You should have Text table always on the right side in joinThere should be a Language columns definedBelow shows an example of Attribute join where Language column is used in text join −

Read More

Secant method to solve non-linear equatio

Chandu yadav
Chandu yadav
Updated on 17-Jun-2020 2K+ Views

Secant method is also used to solve non-linear equations. This method is similar to the Newton-Raphson method, but here we do not need to find the differentiation of the function f(x). Only using f(x), we can find f’(x) numerically by using Newton’s Divide difference formula. From the Newton-Raphson formula, we know that, Now, using divide difference formula, we get, By replacing the f’(x) of Newton-Raphson formula by the new f’(x), we can find the secant formula to solve non-linear equations.Note: For this method, we need any two initial guess to start finding the root of non-linear equations.Input and OutputInput: The ...

Read More

Trapezoidal Rule for definite integral

Samual Sam
Samual Sam
Updated on 17-Jun-2020 2K+ Views

Definite integrals can be solved using this trapezoidal rule. To integrate a function f(x) between the range a to b is basically finding the area below the curve from point x = a to x = b. To find that area, we can divide the area into n trapezoids, and the width of each trapezoid is h, so we can say that (b - a) = nh. When the number of trapezoids increases, the result of area calculation will be more accurate. To solve integrals, we will follow this formula.Here h is the width of the interval, and n is the ...

Read More

Linear Regression

George John
George John
Updated on 17-Jun-2020 1K+ Views

From a given set of data points, the linear regression finds an equation of straight line. The given points will follow the straight line. Using this formula, we can predict what will be the value for some other specific point, which is not present in the set currently.For solving linear regression problems using some data points, we have to follow these formulae:Here the m and c are the slope and the y-intercept respectively. Using these expressions, we can get the equation of straight line in this form: 𝑦 = 𝑚𝑥 + 𝑐.Input and OutputInput: The (x, y) coordinates of some ...

Read More

Simpson's 1/3 Rule for definite integral

karthikeya Boyini
karthikeya Boyini
Updated on 17-Jun-2020 1K+ Views

Like the Trapezoidal Rule, Simpson’s 1/3rd rule is also used to find the integral value from the range a to b. The main difference between trapezoidal and the Simpson’s 1/3rd rule is, in the trapezoidal rule, the whole sections are divided into some trapezoids, but in this case, each trapezoid are also divided into two parts.For this rule, we will follow this formula:Here h is the width of the interval, and n is the number of intervals. We can find the h by using Input and OutputInput: The function f(x): (x+(1/x). The lower and upper limit: 1, 2. The number of ...

Read More

Runge-Kutta 4th order rule for differential equation

Samual Sam
Samual Sam
Updated on 17-Jun-2020 2K+ Views

Runge Kutta method is used for solving ordinary differential equations (ODE). It uses dy/dx function for x and y, and also need the initial value of y, i.e. y(0). It finds the approximate value of y for given x. For solving ODE, we have to follow these formulas:Here h is the height of the interval.Note: From these formulas, we can use first two k1 and k2 find the Runge-Kutta 2nd Order solution for ODE.Input and OutputInput: The x0 and f(x0): 0 and 0 the value of x = 0.4 the value of h = 0.1 Output: Answer of differential equation: ...

Read More

Lagrange Interpolation

Ankith Reddy
Ankith Reddy
Updated on 17-Jun-2020 1K+ Views

For constructing new data points within a range of a discrete set of given data point, the interpolation technique is used. Lagrange interpolation technique is one of them. When the given data points are not evenly distributed, we can use this interpolation method to find the solution. For the Lagrange interpolation, we have to follow this equation.Input and OutputInput: List of x and f(x) values. find f(3.25) x: {0, 1, 2, 3, 4, 5, 6} f(x): {0, 1, 8, 27, 64, 125, 216} Output: Result after Lagrange interpolation f(3.25) = 34.3281AlgorithmlargrangeInterpolation(x: array, fx: array, x1)Input − x array and fx ...

Read More
Showing 53881–53890 of 61,297 articles
Advertisements