area

Matlab, how to calculate AUC (Area Under Curve)?

谁说我不能喝 提交于 2019-11-30 14:08:51
问题 I have the file data.txt with two columns and N rows, something like this: 0.009943796 0.4667975 0.009795735 0.46777886 0.009623984 0.46897832 0.009564759 0.46941447 0.009546991 0.4703958 0.009428543 0.47224948 0.009375241 0.47475737 0.009298249 0.4767201 [...] Every couple of values in the file correspond to one point coordinates (x,y). If plotted, this points generate a curve. I would like to calculate the area under curve (AUC) of this curve. So I load the data: data = load("data.txt"); X

How to divide an area composed of small squares into bigger rectangles?

谁说胖子不能爱 提交于 2019-11-30 13:26:24
Where would i go to look for algorithms that take a 2d grid of values that are either 0 or 1 as input and then identifies all possible non-overlapping rectangles in it? In a more practical explanation: I am drawing a grid that is represented by a number of squares, and i wish to find a way to combine as many adjacent squares into rectangles as possible, in order to cut down on the time spent on cycling through each square and drawing it. Maximum efficiency is not needed, speed is more important. Addendum: Apparently what i am looking for seems to be a technique called Tesselation. Now i only

Matlab, how to calculate AUC (Area Under Curve)?

落花浮王杯 提交于 2019-11-30 09:50:18
I have the file data.txt with two columns and N rows, something like this: 0.009943796 0.4667975 0.009795735 0.46777886 0.009623984 0.46897832 0.009564759 0.46941447 0.009546991 0.4703958 0.009428543 0.47224948 0.009375241 0.47475737 0.009298249 0.4767201 [...] Every couple of values in the file correspond to one point coordinates (x,y). If plotted, this points generate a curve. I would like to calculate the area under curve (AUC) of this curve. So I load the data: data = load("data.txt"); X = data(:,1); Y = data(:,2); So, X contains all the x coordinates of the points, and Y all the y

Android: Measure/detect covered area by a finger touch on screen (NOT only touch coordinates)

倖福魔咒の 提交于 2019-11-30 08:15:19
问题 I would like to get access to the area covered by a finger for each touch event on an Android. Every touch event will result in a coordinate pair X and Y independent of how big the finger and consequently the touch area is that triggered the event. I was wondering if there is a way to get the area data which triggered the touch event e.g. size or coordinates NOT Any help is much appreciated. Thanks in advance for you answer or redirects, Christian 回答1: The method motionEvent.getSize() should

Calculating Area of Irregular Polygon in C#

戏子无情 提交于 2019-11-30 06:48:14
问题 I've managed to write a 'for dummies' how to calculate the area of irregular polygon in C#, but I need it to be dynamic for any amount of verticies . Can someone please help? Class: public class Vertex { private int _vertexIdx; private double _coordX; private double _coordY; private double _coordZ; public Vertex() { } public Vertex(int vertexIdx, double coordX, double coordY, double coordZ) { _vertexIdx = vertexIdx; _coordX = coordX; _coordY = coordY; _coordZ = coordZ; } public int VertexIdx

Calculate area under FFT graph in MATLAB

天大地大妈咪最大 提交于 2019-11-30 05:39:38
问题 Currently I did a FFT of a set of data which gives me a plot with frequency at x axis and amplitude at y axis. I would like to calculate the area under the graph to give me the energy. I am not sure how to determinate the area because I am without the equation and also I only want a certain area of the plot rather than whole area under the plot. Is there a way I can do it? 回答1: There are many ways to do numerical integration with Matlab. Here is an example: %# create some data x = linspace(0

How to arrange N rectangles to cover minimum area [duplicate]

无人久伴 提交于 2019-11-30 05:09:52
问题 This question already has answers here : Closed 6 years ago . Possible Duplicate: Algorithm needed for packing rectangles in a fairly optimal way I have N rectangles, each of a random size (random width & height). All rectangles are parallel to the X & Y axes. I'm looking for an algorithm that helps me arrange these rectangles side-by-side in a way that the resulting bounding rectangle has minimum area and the potential gaps around / between the input rectangles are as small as possible.

Programmatically take a screenshot of specific area

你说的曾经没有我的故事 提交于 2019-11-30 00:25:53
Like you can see in my code, I take a screenshot and save it to the photo album. //for retina displays if ([[UIScreen mainScreen] respondsToSelector:@selector(scale)]) { UIGraphicsBeginImageContextWithOptions(self.view.bounds.size, NO, [UIScreen mainScreen].scale); } else { UIGraphicsBeginImageContext(self.view.bounds.size); } [self.view.layer renderInContext:UIGraphicsGetCurrentContext()]; UIImage *viewImage = UIGraphicsGetImageFromCurrentImageContext(); UIGraphicsEndImageContext(); UIImageWriteToSavedPhotosAlbum(viewImage, nil, nil, nil); At the beginning I used webview.size instead of self

Rounding Inaccuracies When Combining Areas in Java?

江枫思渺然 提交于 2019-11-29 14:40:31
I'm working with Areas in Java. My test program draws three random triangles and combines them to form one or more polygons. After the Areas are .add() ed together, I use PathIterator to trace the edges. Sometimes, however, the Area objects will not combine as they should... and as you can see in the last image I posted, extra edges will be drawn. I think the problem is caused by rounding inaccuracies in Java's Area class (when I debug the test program, the Area shows the gaps before the PathIterator is used), but I don't think Java provides any other way to combine shapes. Any solutions?

Get Area or Elements in zoomed Scatterplot

被刻印的时光 ゝ 提交于 2019-11-29 13:33:31
I've got the following problem. I want to zoom-in a Scatterplot and then select all the displayed elements. It would be sufficient to somehow get the displayed area in the zoomed-in Scatterplot. From the range of this area i could determine which elements are displayed in the area and which are not. \edit: Found the Solution (Implementing AxisChangeListener Interface) import java.awt.Color; import java.awt.Dimension; import org.jfree.chart.ChartPanel; import org.jfree.chart.event.AxisChangeEvent; import org.jfree.chart.event.AxisChangeListener; import org.jfree.chart.plot.PlotOrientation;