[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math


View post   

File: 246 KB, 550x413, 1333662779259.jpg [View same] [iqdb] [saucenao] [google]
4635727 No.4635727 [Reply] [Original]

Say, I need a function f(x), which accepts "x" {from 1 to 100} as input and outputs value "y" {from 14 to 8500}.
How do I approach the problem, if I want "y" to be linearly dependent on "x"? And what if I want a logarithmic relation between these?

>> No.4635734

bumo

>> No.4635735

y=c+k*exp(x)

>> No.4635740

f(x) = ax + b

solve, for a and b, the system
14 = a*1 + b
8500 = a*100 + b

>> No.4635748

>>4635740
Oh, nice.
What about non-linear relation?

>> No.4635757

>>4635748
Download the program "Graph" and plot in ur numbers. Use insert trend-line and select the function type u want.

>> No.4635766

You want a curve that passes through all the points or one that fits better the shape of the distribution of points?

>> No.4635767

>>4635748
There are a lot of interpolation methods, >>4635740 being a direct approach. For a non-linear equation, you merely tack on constants and shit (y=a+bx+cx^2+dx^3+...), obviously with the appropriate number of solution sets to generate the appropriate number of equations so you can solve the constants.

>> No.4635777

>>4635767
>>4635757
>>4635766
Okay, thanks. How do I solve this in Mathematica?
I have studied linear systems long ago.

>> No.4635778

>>4635766
One that fits the shape.

>> No.4635783

>>4635777
Well you could make a matrix out of it and have Mathematica get the reduced echelon form, I think that would be the quickest. I don't know how Mathematica works but I'd assume it's more like MATLAB and less like Wolframalpha.

>> No.4635836
File: 35 KB, 726x363, Снимок экрана 2012-05-01 в 19.12.30.png [View same] [iqdb] [saucenao] [google]
4635836

>>4635783
Can this be the right setup? I have quickly followed the guide, but I am confused by how Mathematica assigns x,y,a,b to which tensors.

>> No.4635868
File: 46 KB, 751x708, Снимок экрана 2012-05-01 в 19.29.16.png [View same] [iqdb] [saucenao] [google]
4635868

>>4635836
Nice.