curves

how to find the similarity between two curves and the score of similarity?

余生长醉 提交于 2019-12-12 08:05:51
问题 I have two data sets (t,y1) and (t,y2). These data sets visually look same but their is some time delay or magnitude shift. i want to find the similarity between the two curves (giving the score of similarity 1 for approximately similar curves and 0 for not similar curves). Some curves are seem to be different because of oscillation in data. so, i am searching for the method to find the similarity between the curves. i already tried gradient command in Matlab to find the slope of the curve at

Curve Fitting for equation with two parameters

不打扰是莪最后的温柔 提交于 2019-12-12 01:46:36
问题 I have two arrays: E= [6656400; 13322500; 19980900; 26625600; 33292900; 39942400; 46648900; 53290000] and J=[0.0000000021; 0.0000000047; 0.0000000128; 0.0000000201; 0.0000000659; 0.0000000748; 0.0000001143; 0.0000001397] I want to find the appropriate curve fitting for the above data by applying this equation: J=A0.*(298).^2.*exp(-(W-((((1.6e-19)^3)/(4*pi*2.3*8.854e-12))^0.5).*E.^0.5)./((1.38e-23).*298)) I want to select the starting value of W from 1e-19 I have tried the curve fitting tools

Multiple curves with same Time x-axis in R

五迷三道 提交于 2019-12-12 01:07:20
问题 Could-you help me please in solving this issue. In fact, i would like to plot multiple curves on the same graph on R with a x-axis which is time labeled. I tried this : dayTime = strptime(sapply(c(0:110)+480, function(x){paste(floor(x/60),":",x%%60, sep="")}), "%H:%M") n = 10 pdf("myGraph.pdf") plot(x=dayTime, y=rep(0, length(dayTime)), main="myGraph", xlab="Time", ylab="Level", type="n", ylim=c(0, 0.05), xaxt = "n") for(i in 1:n) { lines(myData[, i]), col=i) } r = as.POSIXct(round(range

B-spline curves

橙三吉。 提交于 2019-12-06 08:38:34
问题 I have a set of points which I want to smooth using B-spline curves. My question is how can I implement B-spline curves to smooth these set of points? I want to implement this using c++. 回答1: Here is a function for any given number of points: void Spline(double x[N+1],double y[N+1], // input double A[N],double B[N], // output double C[N],double D[N]) // output { double w[N]; double h[N]; double ftt[N+1]; for (int i=0; i<N; i++) { w[i] = (x[i+1]-x[i]); h[i] = (y[i+1]-y[i])/w[i]; } ftt[0] = 0;

airfoil profile geometry plotting

五迷三道 提交于 2019-12-06 03:47:12
I have a little issue with calculating coordinates. Given are airfoil profiles in two lists with the following exemplary coordinates: Example: x_Coordinates = [1, 0.9, 0.7, 0.5, 0.3, 0.1, 0.0, ...] y_Coordinates = [0, -0.02, -0.06, -0.08, -0.10, -0.05, 0.0, ...] diagram 1: The only known things about the profile are the lists above and the following facts: the first coordinate is always the trailing edge, in the example above at (x=1, y=0) the coordinates always run on the bottom/underside to the leading edge, in the example above at (0,0) and from there back to the trailing edge the profile

B-spline curves

心已入冬 提交于 2019-12-04 13:35:21
I have a set of points which I want to smooth using B-spline curves. My question is how can I implement B-spline curves to smooth these set of points? I want to implement this using c++. Here is a function for any given number of points: void Spline(double x[N+1],double y[N+1], // input double A[N],double B[N], // output double C[N],double D[N]) // output { double w[N]; double h[N]; double ftt[N+1]; for (int i=0; i<N; i++) { w[i] = (x[i+1]-x[i]); h[i] = (y[i+1]-y[i])/w[i]; } ftt[0] = 0; for (int i=0; i<N-1; i++) ftt[i+1] = 3*(h[i+1]-h[i])/(w[i+1]+w[i]); ftt[N] = 0; for (int i=0; i<N; i++) { A

Fill several sections below a curve of data in Gnuplot

独自空忆成欢 提交于 2019-12-04 13:21:06
I have a set of points "data" defining a curve that I want to plot with bezier smooth. So I want to fill the area below that curve between some pairs of x values. If I only had one pair of x values it's not that difficult because I define a new set of data and plot it with filledcu. Example: The problem is that I want to do that several times in the same plot. Edit: Minimal working example: #!/usr/bin/gnuplot set terminal wxt enhanced font 'Verdana,12' set style fill transparent solid 0.35 noborder plot 'data' using 1:2 smooth sbezier with lines ls 1 pause -1 Where the structure of 'data' is:

gnuplot: plotting a file with 4 columns all on y-axis

二次信任 提交于 2019-12-03 01:57:56
问题 I have a file that contains 4 numbers (min, max, mean, standard derivation) and I would like to plot it with gnuplot. Sample: 24 31 29.0909 2.57451 12 31 27.2727 5.24129 14 31 26.1818 5.04197 22 31 27.7273 3.13603 22 31 28.1818 2.88627 If I have 4 files with one column, then I can do: gnuplot "file1.txt" with lines, "file2.txt" with lines, "file3.txt" with lines, "file4.txt" with lines And it will plot 4 curves. I do not care about the x-axis, it should just be a constant increment. How could

gnuplot: plotting a file with 4 columns all on y-axis

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-02 15:34:15
I have a file that contains 4 numbers (min, max, mean, standard derivation) and I would like to plot it with gnuplot. Sample: 24 31 29.0909 2.57451 12 31 27.2727 5.24129 14 31 26.1818 5.04197 22 31 27.7273 3.13603 22 31 28.1818 2.88627 If I have 4 files with one column, then I can do: gnuplot "file1.txt" with lines, "file2.txt" with lines, "file3.txt" with lines, "file4.txt" with lines And it will plot 4 curves. I do not care about the x-axis, it should just be a constant increment. How could I please plot? I can't seem to find a way to have 4 curves with 1 file with 4 columns, just having a

Draw a curved line from an arc edge

*爱你&永不变心* 提交于 2019-12-02 02:47:22
Here's the screenshot of what I am doing. Currently, I'm stuck from drawing a curved borders into this rectangle. My first solution was: draw a quartered circle behind the rectangle, but if I adjust the opacity of the shape, as you can see, the quartered circle gets shown. I know this is pretty basic for you guys but I'm not really good at math. I did try to reuse the computed edges of the arc and add the size of border but I got this as a result. I also think of bezier curves as a replacement but I think it is more efficient to just reuse the computed vertices and add all the missing ones.