Simultaneous linear equation solving

I'm trying to solve some ill-conditioned simultaneous linear equations for a graphics application. Gaussian elimination using total pivoting on doubles isn't accurate enough. Does anyone know any better techniques?

yeah, that's pretty good. you might also try some numerical algorithms though if your system is sparse or you want a better performance if your system is large. nist website has a list i think.

Similar Messages

  • Is there a linear equations VI thatI can use for inputting the coefficients with variables attached to them? Thank you.

    Is there a linear equation VI that I can use for inputting the coefficients with variables attached to them? I am currently studying elec engineering and am in the thick of transient analysis. It is very time consuming figuring the mesh and nodal analysis in the transform domain. With 3 branches in a mesh analysis the resistors, inductors and capacitors are represented with variable s in them. I need to determine in the transform domain then convert to the time domain. One equation goes like this: (3+2s+1/4s)i1s - (2s)i2s - (1/4s)i3s = 6/s -6. The other equations are similar. I must keep the variable s in the equation and solve it with s in the result. I made several VIs for determining simultaneous linear equations some for complex numbers and they work great. This one has me a little stumped. I thinking that maybe Labview doesn't have a VI for this. The other VIs were fine because you just plugged in the numbers and ran the VI and got your result. Any VIs that do LaPlace transform operations?
    Thank you.
    Tom

    Hello Tom,
    You can find a VI for doing Laplace transforms in Functions->Analyze->Signal Processing->Frequency Domain (this VI is only available in the Full and Professional versions).
    You may also find the following tutorial of help in working with linear systems in LabVIEW.
    Linear Systems in LabVIEW
    Keep up to date on the latest PXI news at twitter.com/pxi

  • Is there a limit on the size of the input for the Solve Linear Equations block?

    Hello,
    I'm trying to figure out why the Solve Linear Equations block will properly function with some sets of data and why it won't with others. What my program is doing is taking a signal and comparing it with a batch of sine and cosine waves to try and pick out patterns in the data. I have different sample sizes and it seems to work when I throw 3900 points at it. However, I have another set with 4550 points and it gives me incorrect amplitudes for my sinusoids.  Is there some limit to the size of the matrices that I can give this block? Or is there some other workaround that still allows me to keep all of my data?
    Thanks,
    David Joseph

    Well, the best way to show what I expect is to see the entire program. It's pretty evident that when looking at the graphs, something isn't right. What is supposed to happen is that the runout amplitudes are found, and then those sinusoids are subtracted from the initial data, leaving tooth to tooth data and noise. When I use the larger arrays, it seems as though not all of the data gets through (count the peaks on the product gear runout graph vs. initial) and the amplitudes are much to small, such that nothing is really taken out and the tooth to tooth data looks like the initial data.
    Also, we will also be using an FFT, but it will be limited to only determining the frequencies we should check. I've fought with the fft blocks quite a bit and I just prefer to not use them. Plus, the guy I'm writing this for wants exact answers and does not want to pad or resample the data or use windows.
    The exact number of data points isn't important (ie. 4550 vs 4551) since I use the array size block to index the for loop.
    As for typical values, they can change a lot based on materials. But, the original 3900 data point sets and the 4550 data point sets used practically identical gears. So, use the original 3900 sets I've included as references (check the RO array block numbers to compare).
    I've included 3 3900 samples, 3 4550 samples, and 3 4550 samples that have been truncated to 3900 or so as constants on the block diagram.
    Also, the check for additional runouts (like 3 per rev, 4 per rev, etc..) is optional, but if you choose to use it, use positive integers only.
    I don't know how much of this program will make sense and I have wires running everywhere.. so good luck. Keep in mind I'm only a student and I hadn't touched Labview until about 2 or 3 months ago.
    Thanks,
    David Joseph
    Attachments:
    Full example.vi ‏139 KB

  • How can I solve a system of linear equations for the non trivial solution?

    I want to solve the equation A Q =0 where A is a 1xn matrix and Q is an nxn matrix for A. I tried using the Solve Linear Equations sub.vi but it just gave me the trivial solution. What can I do to solve this?

    Larry of KochLab,
    Have you looked at the MathScript Node? Would it be possible to post a simple example of what you are trying to do?
    Ben Sisney
    FlexRIO V&V Engineer
    National Instruments

  • Solve Linear Equations NaN return

    I've implemented a modified Linear Levenberg Marquardt function for gauss fitting of spectral data, but have problems from time to time where I simply can't fit a specific data set.
    I've traced the problem to the function "Solve Linear Equations" outputting NaN for one or more solution vectors (Not all) which then plays havok with my function.
    I've located a data set which is initially OK, but which after solving the linear equations has NaN as the second element of the solution vector array. Changing the matrix type to something other than "generic" gets rid of the NaN for this particular data set, but gives problems with others which work with the "generic" matrix type.
    Since my mathematics lectures in college are a few years away now, I'm asking someone out there if they can help me with my problem. I can supply a "corrupting" data set if this would help, or maybe someone knows this problem and has a work-around?
    I've thought of leaving the matrix type to "generic" and checking the output to see if there's a NaN present, and if so, then re-calculate with another matrix type until there's no NaN. This is most likely not very sound mathematically, but it might reduce the number of rogue data sets.
    Thanks in advance
    Shane.
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)

    Hi Altenbach,
    The data can have a significant amount of overlap. Typically three to four groups of peaks fully resolved, but each group can have up to 4-5 peaks in them, partially visible only as shoulders.
    The start value "problem" is more or less solved (but as usual, not yet finished).
    I've got an approximate first-guess peak find running which does a pretty good job of finding the peaks I need, and I then fit the height and FWHM first before doing a full optimisation (The Sub-VI approach allows much more flexible fitting models).
    The fitting works well on almost all data sets. There are simply some spectra which (although visibly hardly different to others which work perfectly) do not fit, i.e. generate the NaN response from the "solve linear equations" function. It's a numeric problem (bug?), I'm sure, and not strictly a peak location or resolution problem. then again, I may be wrong.
    I refer to the standard "LevMar" VI as being linear, because it assumes a linear relationship between the variable variation and the end mse used for optimisation. This is where the "Solve linear Equations" comes in. Since the relationship is almost certainly not linear (foe example when peaks overlap), I thought maybe the non-linear coefficient guess may yield better results. I've had a quick look through the non-linear LEV-MAR function, but don't understand it yet ot the extent I understand the linear one. It does indeed seem to take a slightly different approach (once you look past the whole parsing code of the "linear" function.
    I'll need some time to get some understanding of the non-linear code.
    Attached are some example spectra (One which works, and one which doesn't).
    Thanks again
    Shane
    Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
    Attachments:
    Spectra.zip ‏3 KB

  • Solve linear equations vs pseudoinverse memory issues

    Hello,
    I am trying to solve a Ax
    = b system, and have setup my algorithm to use the LU decomposition
    followed by the appropriate use of the "Solve Linear Equations" VI. I
    then check the error output from this VI, and if there is an error I
    try using the "PseudoInverse Matrix" VI.
    I am doing this in a loop with a progressively larger matrix for each iteration.
    This
    works great EXCEPT for when my algorithm gets close to the maximum
    memory allowed (i.e. - the iteration BEFORE I get an error message
    stating that the VI has run out of memory).Then, although I do NOT get
    an error code from my "PseudoInverse Matrix" VI, the values output from
    this VI are complete garbage (really really large values).
    Has
    anyone come across a similar issue before? Is there a way around this?
    i.e. - I would like to know when/if the  "PseudoInverse Matrix" VI will
    not provide valuable data output so I can stop my algorithm the
    iteration beforehand.
    Thanks!

    Zamjir,
            Can you post the VI and the matrix needed to replicate the issue? I didn't find any other instances of this happening but that doesn't mean that it's not expected. I understand that things ramp up in memory and just before it tops out it shows large (not correct) values but I don't know if this is expected and is just LabVIEW's way of letting us know that it's about to error out (in case you wanted to build in a shut down program you could base it off of these large values) or if it is a bug. If you could post the code so I can take a look at it and also a screenshot of the "out of memory" error you see, I will see what I can find out for you. 
    Grant H.
    National Instruments
    LabVIEW Product Marketing Manager

  • Linear Equation in SAP

    Hi Gurus,
    I got a requirement to develop Simulator Process in which we are using Linear Equation for solving.
    Linear Equation is wat we studied in School days...
    3x + 2y + 7z = 20.  (meaning: 20 is my target.. i want to know how much of x, y, z is added to achieve my target)
    5x + 6y + 6z = 50.
    6x + 2y + 2z = 10.
    i want to know the values of x, y, z(this variable will be up to 10 also).
    I know to solve manually.
    Can you tell me is ther any function module to acheive this...
    Or any easy way to develop in SAP?????
    Thanks n Regards
    Aravindh Mani

    Hi,
    I dont think there is a standard FM for this. You can better try to code the logic manually for this.
    Regards,
    Vik

  • Solving Coefficien​ts for Non-Linear Equation

    I have the following equation that I need to solve a, b and c. y = a+bexp(-x/c). Is there a VI that is written to help me?

    i don't understand what do you suppose to mean?
    you have not a,b and c values and you wanna solve 3 unknown variables with just one equation?
    do you think is that possible?
    even you had x and y values!
    but if you have 4 values and you just want to find another variables value it's so easy
    you can easily use a formula node.
    i have write a simple program for you to solve this equation and i attached it to this answer.
    it's with LabVIEW 5.
    Attachments:
    formula_node_example.vi ‏25 KB

  • Solving functional equation and or evaluating non-linear equations

    Does anyone know of a computer program that will do either or preferably both of the following:
    1: a functional equation; e.g. 4x^2exp(-1/1-x^2) -6x = 0;
    2: Evaluate a function at specified points; e.g. what is the value at -.5 of the above expression.
    i imagine excels solver does the second but I didn't load solver when I loaded excel.
    I'm not too proud to accept solutions as well. Many thanks.

    Is it what you wanted ?
    In cells of column B, the formula is :
    =IFERROR(INDIRECT(ADDRESS(1,2,,,A&" "&$A$1)),"")
    Between the late double quotes I insreted the character INFINITY ($221E)
    Yvan KOENIG (VALLAURIS, France) mercredi 21 avril 2010 20:44:36

  • Differenti​al Equation Solving Help

    I am trying to solve the diff equation
    x'' + ax' + bx = c
    The ODE Linear nth Order Numeric function can handle the second derivative but not the c part, correct?
    The euler and assorted solvers can't handle the second derivative nor the constant, correct?
    Do I have any other options?
    thanks.

    It has been a really long time since I have fired my DiffEq neurons. Plus all of my text books are at home.
    I looked a the labVIEW shipping examples. (Open LabVIEW >> help >> file examples >> click on search tab and enter ODE.) Shooting method.vi seems to solve second order equations with a constant. I could be wrong. You may want to look at this one and the other examples for inspiration.

  • Best fit/ linear equation in Numbers on the IPad?

    Does anyone know how to find the best fit line equation on Numbers for the IPad? I know how to find it in IWork for the MacBook and how to find the line on the Ipad. Thanks

    Can you tell me where line of best fit is in the iOS version? I havent seen it yet.
    You can search on the Internet for the linear regression formul, and compute the equation yourself. Then you could plot that series of points on your chart to show the line if it is not part of iOS.
    Jason

  • Equation solving

    I would like to plot the following equation
    I=exp(x-I)
    Is there any easy way to solve for 'I' having a given x?

    Is that a number 1 in your exponential or a letter I? If it's the number 1 then the simple answer that you've been given will work. If it's the letter I then you have an algebraic equation of x=I+ln(I). Perhaps you could construct your array in reverse (i.e., determine x in terms of I) and then plot it the other way. I have attached a simple example. You could use a case structure in conjunction with a while loop instead of the for loop to set upper and lower limits on the value of x. Note that this will not give you equidistant x values.
    There are certainly ways to solve for the value of I, but at present I can't think of any which are straightforward.
    Hope this helps.
    John
    Attachments:
    I_eq_exp(x-I).vi ‏21 KB

  • Nonlinear Differential Equation solver

    Hello..
    I am trying to slove first order DE of the form.. dP/dz = A ln{ [1+[(P(z)/B)*exp(-C)]] / 1+P(z)/B } where A,B and C are numerical values. I tried to plot Z vs P(z)  using ODE slovers but didnt get the result. I am attaching the expected plot also. I found some examples like ODE circuit in LV help but end up in empty graph after trying to slove this above equation. which methode is correct to slove this equation, please suggest some way.. Thank you very much.
    Attachments:
    solution plot.png ‏6 KB

    It's been a long time since I thought about diffEQ.  Please post what you think should be a solution -- it's probably easier for me to figure out why your graph is empty than it is to figure out how to solve an ODE from scratch. 

  • Non-linear equation solution

    I have used Lev-Mar Non-Linear VI before but cannot understand how to apply to the following:
    deltaTC = R(TC)*L^2 + QS + QC(TC) +QR(TC)*dt
    where variables containing (TC) are dependent on TC.
    I have samples of change of L over time (dt).  Trying to determine dTC with variables dependent on TC (current value - which means initial T + dTC).
    Any help much appreciated.

    Hi Battler,
    I am not sure if you know this or not but Lev-Mar Non-Linear VI is not supported any more. Instead you can use Nonlinear Curve Fit.vi . It is located in function->mathematics->fitting palette.
    The functionality of both of them is the same.Next you can go LabVIEW help, search for this VI, and then look at the "Linear, Exp, and Power Fitting VI: labview\examples\math\curvefit.llb"
    example. On the block diagram go to "Time out"and "true" for the case structures.You will see the Nonlinear Curve fit.vi, you need to input your equation to the reference terminal f(x,a). So
    you need to make a subVI of your equation, and input it into f(x,a). Hope this helps!!
    Edna
    National Instruments
    Applications Engineer

  • Linear equation problem

    Here is the problem:
    I have 2 point A(x1,y1) & B(x2,y2) ,what i need is find a point C(x3,y3);
    This point C should :
    1)form a line AC that goes throught point B
    2)C is intersectin point of the line AC & one of screen edges :
    (left=0,right=ScreenWidht,top=0,bottom=ScreenHeight)
    3) The C point form a line (vector?) A--->C & not C--->A
    I need to fighure out the C ,so if A is a projectile source,the projectil
    will fallow the Target (C point) from A---->C..
    Hope that clear enought,i would realy appreciate if i get some help soling this math problem (im not good in math) , that will be great if i get some code ( routine that takes x1,y1,x2,y2 as parametres and calcule x3 and y3)
    Thanks.

    Here is the problem:
    I have 2 point A(x1,y1) & B(x2,y2) ,what i need is find a point C(x3,y3);
    This point C should :
    1)form a line AC that goes throught point B
    2)C is intersectin point of the line AC & one of screen edges :
    (left=0,right=ScreenWidht,top=0,bottom=ScreenHeight)
    3) The C point form a line (vector?) A--->C & not C--->A
    I need to fighure out the C ,so if A is a projectile source,the projectil
    will fallow the Target (C point) from A---->C..
    Hope that clear enought,i would realy appreciate if i get some help soling this math problem (im not good in math) , that will be great if i get some code ( routine that takes x1,y1,x2,y2 as parametres and calcule x3 and y3)
    Thanks.

Maybe you are looking for

  • Can't find driver for Scanjet G2410 on OS 10.7

    Hello. I have just bought a Scanjet G2410. When I first ran the installation CD, the instalation compleete with the following message: "L'extension système «/System/Library/Extensions/hpPlugInInit.kext » n'a pas été installé correctement et ne peut ê

  • Blank Login Page after Upgrade from 4.0.2 to 4.1

    Greetings, I just upgraded one of my Apex environments from 4.0.2 to 4.1. After the upgrade, I tried to access the login url and I get a blank page. Nothing on it, just a white page. However, if I do a View Source, all the html code is there. I wonde

  • Oracle Form designing problem...

    Hai experts, I am facing some problem in the oracle form desiging. we are receiving the dates from the customer and we are capping,washing and stuffing more than 10 service we are doing. refno -- primary key header table refno cust name mobile no wei

  • Can Java SE run in a Window PE (Preinstallation Environment)

    Hi there, Can Java SE run in a Window PE (Preinstallation Environment). Thank you for all your help....

  • Getting ComException (0x80004005):The system cannot find the file specified

    Our customer is getting an error from her remote location via the internet, running a report that has not changed in a year.  None of our other customers are having this problem.  When we sign in from our office with her credentials, we do not get th