Questions tagged [quadratic-curve]

a quadratic polynomial

It is advised to use .

40 questions
1
vote
3 answers

How to create prediction line for Quadratic Model

I am trying to create a quadratic prediction line for a quadratic model. I am using the Auto dataset that comes with R. I had no trouble creating the prediction line for a linear model. However, the quadratic model yields crazy looking lines. Here…
im2wddrf
  • 551
  • 2
  • 5
  • 19
1
vote
2 answers

Rounded corners on chartJS v.2 - bar charts (with negative values)

I'm styling some chartjs bar charts which need rounded corners at the bar's values (not their base), In most cases this means rounded corners at the top of the bar's however there are also instances where the bars have negative values. I've used the…
Andy Kleeman
  • 43
  • 2
  • 7
1
vote
0 answers

R: test quadratic regression with interaction

I have data from an experiment with two conditions (dichotomous IV: 'condition'). I also want to make use of another IV which is metric ('hh'). My DV is also metric ('attention.hh'). I've already run a multiple regression model with an interaction…
1
vote
3 answers

Transport Mathematic function into a program

I try to import a mathematic function into Javascript. It's the following formula: http://www.wolframalpha.com/input/?i=-0.000004x%5E2%2B0.004x Example Values: f(0) = 0 f(500) = 1 f(1000) = 0 So that is my function: function jumpCalc(x) { …
Standard
  • 1,450
  • 17
  • 35
1
vote
1 answer

Quadratic Bezier Curve with inner Triangle

Recently I am building a JavaScript module to add convenience functions to draw a quadratic bezier curve. This function have a source point, a target point and a control point and will create svg path like this:
Gabriel
  • 1,413
  • 1
  • 18
  • 29
1
vote
1 answer

How to find the control point of a quadratic curve using a parabola?

I can't figure out how to draw a parabola which is having a equation as y^2 = 4ax So I have both end points i.e. P0, P2, however I can't figure out how to find control point to put in quadraticCurveTo() function.
codeomnitrix
  • 4,179
  • 19
  • 66
  • 102
1
vote
1 answer

How come this doesnt draw rounded corners?

I am trying to draw a rectangle with rounded corners, so far only the top corners are rounded, But the bottom two corners are not somehow? Full code: https://github.com/GunZi200/Memory-Colour/blob/master/SourceCode.js Can you guys spot the error? …
1
vote
0 answers

Draw approximate curve using quadratic equation

I have a graph that generates 4 curves and I need to draw an approximate graph using ax2+bx+c for a particular area. So I have. Collection of data points (x,y).... up to ....1000 My question: 1. is there any algo for selecting appropiate three point…
user765443
  • 1,856
  • 7
  • 31
  • 56
0
votes
1 answer

How can I draw a curve where the curve does not go over the text?

I want to add a text to the center of quadratic curve or line like this: I tried to add a text with ctx.fillText but it overlaps the curve. how can I draw a curve where the curve does not go over the text? My code: // draw the curve const…
mediumgoal
  • 11
  • 1
0
votes
2 answers

How to fit a quadratic equation to a plot obtained from plotmeans function in R

We are analyzing fixed effects heterogeneity across years of a panel database ("mydata") containing values of an economic explained value depending on 12 independent variables. Data correspond to the period 2007-2017 and 142 countries. We use…
jmatosv
  • 1
  • 1
0
votes
0 answers

How do I make this app factor a polynomial with quadratic formula or some other trick?

How do I make this app factor a polynomial with quadratic formula or some other trick?. The polynomial 3x^2 +10x -8 can be factored to (x +4)(3x -2) with the use of grouping or the X trick. I would like my code to do this but I have no clue how to…
John Smith
  • 835
  • 1
  • 7
  • 19
0
votes
0 answers

Quadratic Model Estimation With Ransac

I'm trying to use Ransac for model fitting according to this example : https://scikit-image.org/docs/dev/auto_examples/transform/plot_ransac.html#sphx-glr-auto-examples-transform-plot-ransac-py Acording to…
0
votes
1 answer

Fit quadratic function to data using MSE

So my idea is (borrowed from neural network folks) that if I have data set D, I can fit a quadratic curve to it by first calculating the derivative of the error with respect to the parameters (a, b, and c), and then do a small update that minimizes…
Nyxeria
  • 363
  • 1
  • 4
  • 12
0
votes
1 answer

Drawing rounded/movable area over image

I would like to draw rounded area and points over a photo. I decided to do it with a svg which is simplier to make it resizable and movable. But, from a list of points I do not have an area which go through all points. I used the Quadratic Bezier…
QuentinG
  • 101
  • 2
  • 11
0
votes
1 answer

Plotting quadratic curves with poisson glm with interactions in categorical/numeric variables

I want to know if it's possible to plot quadratic curves with Poisson glm with interactions in categorical/numeric variables. In my case: ##Data set artificial set.seed(20) d <- data.frame( behv = c(rpois(100,10),rpois(100,100)), …
Leprechault
  • 1,531
  • 12
  • 28