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

Similar Messages

  • 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.

  • 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.

  • 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. 

  • Solving Riccati equation

    I have experience with Systembuild only.
    I saw that Xmath has a module with a function to solve the Riccati equation. How can I use this function in Systembuild?

    The Riccati equation can be solved in SystemBuild using a UserCodeBlock where internally the function XmathExecute is called to solve the Riccatti equation using Xmath.
    This Riccati equation solver could be placed in a slower periodic SuperBlock so that it is not recalculated every time step.
    Another UserCodeBlock (file scoped with the Ricatti solver UserCodeBlock) could return the new A and B matricies.
    But, the real problem is how to inject the new A and B matrix into your model.
    The SystemBuild StateSpace block A,B,C and D matricies can be only changed during simulation initialization.
    You would have to create your own StateSpace SuperBlock using the matrix multiple blocks, UserCodeBlock(returns new A,B), intergator block and summer blocks to calculate.
    Xdot = Ax + Bu;
    Y      = Cx + Du;
    It would be much easier if there were a StateSpace block that had the A and B matricies as inputs.
    Note: using SystemBuild the UserCodeBlocks and StateSpace SuperBlock dimensions are fixed and would have to be determined before hand.

  • Solve equation with one unknown parameter (x)

    I am working on a Windows Phone program that calculates taxes due. One of the calculations is a formula/equation with an unknown 'x'. I have searched a lot on solving equations with vb but this really exceeds my - admittedly small - math knob. Perhaps you
    can help me out.
    The equation to solve is (for example):
    ((25000 + x) * 0.06) + x = 16500
    The only unknown variable is x. Does someone know the proper code to solve this equation?

    Are you looking to code some super-intelligent maths equation solver that can solve any type of equation (if so - good luck!)? Or are the equations you want to solve all of the same type?
    The example you gave is of the form (A + x) * B + x = C. You can rearrange that to (1 + B) * x + A * B = C and from there to x = (C - A * B) / (1 + B).
    If all your equations are in that form, you just need to identify the value of A, B and C and use the last formula I gave to calculate x.
    I wasn't going to do that for him.
    Let's see here, he's building a program for tax calculation and he can't do 8th grade algebra??
    Still lost in code, just at a little higher level.

  • Ray Tracing question

    Hi all,
    In Java2D the tracing algorithm can handle effectively primitive shapes, like cubes, spheres etc, mapping the shapes from 3D to 2D. So we can, for example, rotate the whole "scene" and have a 3D illusion of the world. But what about images? The ray tracing algorithm uses the 3D coordinates system, so how can we handle the 2D representation of an image? I know that in Java3D there are special Loaders that load a description of an image and tranform it appropriately in the 3D world. Is there any way to have a 3D representation of an image in Java2D?
    Thanks

    helmik,
    LabVIEW does not do symbolic math.  Once you have the equations solved on paper or reduced to a set which can be solved numerically, tehn you can program it in LV.
    When I look at your math in the first post, I see that in (3) you describe an equation in x and a. However, this is not a quadratic equation but a fourth order polynomial with terms like a^2*x^2 and 2*a^2*x*y_0. So this is not so easily solved.
    Is not the tangent to the sphere at right angles to the radius at that point? The angle of the radius can be calculated from x_0 and y_0 and the center of the sphere. Then add 90 degrees. One arctangent and no complicated equations.
    Lynn

  • Read multiple axis status

    The problem is the slowness of some commands in Labview 8.2 (winxp and PXI-8105 controller)
    I am trying to control the speed of a three axis robot  using a PXI-7350 motion controller, but I need to update very fastly the control loop (1-2ms)
    I found that the more time consuming functions are "read per axis status" and "load velocity".
    These are probably the main issues to be considered
    1. I need only to read the "motor off", "following error", "Move Complete" while the "read per axis status"returns many other variables.
    2.  Both the vi must be called three times, one time for each axis.
    Is it possible to build a single vi that, using a single command, queries the motion controller only for few specified variables and sets all the axis velocities?
    In case, the variables are:
     "motor off"
     "following error"
    "Move Complete"
    "vector space position"
    Thanks

    The application is: to move the end effector as a function of an
    analog feedback signal, avoiding auto-collision (like moving a robot
    with a joystick).
    The problem is that the signal is correlated to
    the motor displacements via a unlinear process so the control board
    cannot be configured using that signal. I have to measure the signal
    and to calculate on the fly the velocities of the motor that make the
    end effector follows the feedback signal. I need to optimize the
    "control loop" in order to avoid vibrations, jitter and to permit the
    PXI to make other things like data communication with other pc in the
    network. Another important issue is the critical routine for
    auto-collision avoiding: the robot must stop as soon as particular
    combination of axes position occurs.
    It's incredible, I
    spent so much time in optimizing the kinematic calculations (a 9x9
    non-linear sistem of equations solved in 2ms) and now I see that the
    critical routine is the communication between PXI-controller and motion
    controller!!!
    (I know that the best solution would be to
    build a motion controller by myself using a NI-FPGA device, but I
    really don't know how to implement a matrix inversion calculation on a
    FPGA processor...)
     Fabrizio Patanè

  • BEGINER NEEDS URGENT HELP!

    Hi, I'm new to java and have decided to write a simple calculator program, I know how to carry out calculations in Java but i don't know how to read in intergers from the keyboard.
    I am printing out a request for a value to be inputted but i don't know how to begin reading it into the program, If someone can tell me how to read value A into the program I will be able to work ot the other values for
    myself.
    I have included my code if it helps anyone but i have not gotten very far.
    Any help would be appreciated.
    //import;
    public class quadratic {
    public static void main( String args[] ) {
    EasyInput kbd = new EasyInput();
    System.out.println("\nA simple calculator program");
    System.out.println("\n\nPlease enter a value for A");
    System.out.println("\n\nPlease enter a value for B");
    Thanks everyone.
    [email protected]

    Thanks for your help by telling me how to read numbers in from a keyboard, i saw the code you gave as an example and it appeared to be from a quadratic equation program.
    I was wondering if it would be possible for you to email me the code for the quadratic equation solver so that i may compile and run the program and then disect it so that it may allow me to learn java faster and easier than just working on examples from a text book.
    Thanks pioneer36
    email: [email protected]
    import java.io.*;
    public class quad
    * @returns int[] - the two solutions
    public static int[] quadraticEquation(int a, int
    int b, int c) {
    System.out.println("a: " + a);
    System.out.println("b: " + b);
    System.out.println("c: " + c);
    * the formula goes here
    return new int[2];  // b + or - rest of equation
    public static void main(String[] args)
    throws NumberFormatException,IOException
    BufferedReader br =
    new BufferedReader(new
    (new InputStreamReader(System.in));
    System.out.print("Enter a: ");
    String line = br.readLine();
    int a = Integer.parseInt(line);
    System.out.print("Enter b: ");
    line = br.readLine();
    int b = Integer.parseInt(line);
    System.out.print("Enter c: ");
    line = br.readLine();
    int c = Integer.parseInt(line);
    int[] solutions = quadraticEquation(a, b, c);

  • Complicated easy question - ray tracing

    Hello,
    i am working currently on one project - i have an optical system (some prisms, some lenses etc) and i want to make a VI to calculate propagation of a light ray - something like ray tracing.
    I know that labview is not the perfect platform to deal with this issue, however i still would like to try.
    My problem is as following: i want to calculate the propagation of a ray through a lens. I have the ray with some coordinate (y=const) and a plano convex lens - the front of a lens is a piece of a sphere. To calculate the propagation (using snell law) I have to find an angle between the ray and the line which is tangent to this lens-sphere in the point where my light beam hits the lens.
    My procedure (on the piece of paper):
    1.i know the coordinates of a center of a sphere (let's take (0,0)) and its radius r (x^2+y^2=r^2). I know the value of y=y_0 for which the ray enters the lens.
    then i can calculate the x_0: x_0^2+y_0^2=r^2. Now i know the point where light enters the lens (x_0,y_0)
    2.then just the usual procedure of finding equation for a line tangent to sphere (y=a*x+b):
    i put y_0 and x_0 to this equation:
    y_0=a*x_0+b
    and i can remove one unknown value (for example b): y=a*(x-y_0)+x_0
    3.then i put such equation into the equation for sphere (x^2+y^2=r^2) and this is the quadratic equation which has only one unknown value x and one free parameter: a.
    4.beacause i want to have tangent line, so it should have only one common point with sphere - so the quadratic equation should have determinant equal to zero (only one solution for x). This gives me an equation for a. I should find the value of a which satisfy this equation and then i know this tangent line and have the solution! uf....
    Unfortunately i still didn't find a solution to implement this in labview (and i'm motivated beacuse most of the work for this project is already done). I was trying with the formula parsing and so on, but i didn't succeeded. 
    I will be really grateful for any hints or help!
    Solved!
    Go to Solution.

    helmik,
    LabVIEW does not do symbolic math.  Once you have the equations solved on paper or reduced to a set which can be solved numerically, tehn you can program it in LV.
    When I look at your math in the first post, I see that in (3) you describe an equation in x and a. However, this is not a quadratic equation but a fourth order polynomial with terms like a^2*x^2 and 2*a^2*x*y_0. So this is not so easily solved.
    Is not the tangent to the sphere at right angles to the radius at that point? The angle of the radius can be calculated from x_0 and y_0 and the center of the sphere. Then add 90 degrees. One arctangent and no complicated equations.
    Lynn

  • HOW TO CONVERT DEGREES MINUTES SECONDS TO DECIMAL DEGREES IN HP 50G

    Equation: How to write and equation that includes SIN of 10 degrees 25 minutes 15 seconds to Decimal Degrees (10.4208 degrees. OR convert 10.4208 degrees back to 10 degrees 25 minutes 15 seconds.

    Hi,
    When using the Equation Writer, you can also find commands in the CAT menu ( red rightshift SYMB ) or you can manually type them in using alpha letters too.
    However, for the numeric equation solver, you can trick RPN mode into accepting HMS-> and ->HMS as follows:
    create a program:
    <<  `B=->HMS(ACOS(SIN(HMS->(A))))`  >>                     (note: you will have to enter the brackets manually)
    Note: ` is a slanted apostrophe, obtained by press and hold  Red RightShift ( ) and '  ( ).
    Save this program as e.g. 'EQ1'
    Open the numeric solver and for "Eq:" select CHOOS then select EQ1. It should show the program equation and variables A and B. You can enter data and solve for variables as normal.
    Best regards.
    EDIT: you can actually write this program directly in the editor of the Solver without first creating EQ1.
    Note: I do not work for HP, I just like playing with calculators :-)

  • Internet slow with G5 using Airport Extreme ethernet

    I have the reverse of everyone else's Airport issues-I run SLOWER on ethernet! I bought & installed Airport Extreme two days ago. It's running into a DSL modem which is set up as a bridge. Our wireless computers (iMac/Intel and Dell netbook) have no problems. My newest Mac (2.26 GHz Quad Core, OS 10.6, ethernet connected), is fine, but my G5 (pre-Intel Dual 2GHz PowerPC, OS 10.4.11), also connected via ethernet, is taking 40-50 seconds to load a page. The G5 doesn't even have wireless capability, so I never loaded those software updates. Because of this I thought the G5 might be having a problem communicating with Airport, even through ethernet, so last night I updated to the latest Airport Utility package for 10.4.11 (21-20-49.pkg) This didn't seem to help.
    I usually use Firefox, but tried Safari and Explorer-same problem. If I reset the DSL modem to standalone mode and connect the computer directly, the G5 downloads at its normal fast speed.
    One last thing, and it's really kind of weird. I went to Network Utility and 10-pinged a couple of sites (google & bbc.uk). The average speed on the G5 for google was 23.945. The average speed on the QuadCore was 24.479! Slower!! I may be misunderstanding what this means. A page that takes 60 seconds to load on the G5 will load in 4 seconds on the Quad.
    Is it Tiger? Is it because my G5 is pre-Intel? Is it because Airport doesn't like me? Please help!

    Changing ports didn't work. But then I thought of running from the G5 to a different ethernet line altogether (got one for clients on the other side of the room) and the downloads were spot on. I went back to the original config-wall jack to a Belkin UPS for isolation, out of the Belkin to the computer. Swapped all the ethernet patch cords with no difference, but taking the Belkin out of the equation solved the problem. Got to find another way to isolate though.
    Last thought: I don't know why the Airport and Belkin have this issue.

  • Excel Tools Goal Seek Equivalent?

    I looking for an action in Numbers that would act like excel's "goal seek", where you select a result cell, designate a seek value, and then select a "change" cell, push go and get a nice quick iteration.
    Example, you have a complex equation that pulls input from several cells and displays an answer in a single cell. With Goal Seek in Excel, I would designate the "Results" cell, enter the answer I'm seeking, then designate one of the cells that drive the equation, and press go. Excel would quickly give the "x" that produces "y" in my complex equation. An iterative equation solver.
    Can't find one in version 08, maybe version 09?
    Any clues appreciated,

    someone just asked me on another board for this same thing. If this isn't the same person, I posted a workaround in '08 more than a year ago on another web site. It isn't perfect, but it worked ok. you have to customize ti for your situation and equations of course.
    Numbers Templates forums Post
    Good luck,
    Jason

  • I coded my very first app and wanted some opinions and advices about it and about my website

    So, my first application is written in cocoa applescript. All it does is calculate the result of some formulas such as areas. I built a website to share this and more apps that will be released by me. Here's the link: http://pirapps.netii.net . For my next application I wanted to build a simple equation solver (I'm doing all this to make things easier at school) but I have no ideas on how to do it. I'm planning to do it on AppleScript or Objective-c. (Terminal-Don't want to mess with the interface right now) Could you guys give me some advices related to the logic in the program?

    I suppose the easiest way for your example would be to just get the part of the string to the right of the equal sign, but depending on exactly what you are doing expression parsing can get involved.
    Website design is pretty much an art form, and I'm not really an artist (my website leans a bit more to the 'industrial' side, for example).  There may be some pros here that could give a better opinion.

  • Using the RK4 VI, had a question about implementation

    Here's a link to the system I'm approximating:http://i.imgur.com/EXnswBm.png
    The way it's going to be used, it will use current values to calculate values that will be important in the next iteration of a while loop. The values passed into it via the X0 input will be from the last loop iterate, and the values coming out will be sent into a shift register. The length of each iteration varies according to another VI, so it'll be flipping between 5 and 10 minute cycles.
    My question pertains to that max[] that's in the DE for I1(t).
    Since labview isn't a functional language, I know that whatever I put into the F(X,t) array will be interpreted as a string, and not parsed as a function. Since the max operates on one of the variables, I can't simply apply the max[] operation outside and just leave that space as a number, or a dummy variable.
    So is there any way to do this? Even a case structure wouldn't handle it, because it'd have to be applied for every iteration of RK4, and not just to the VI as a whole

    The fundamental issue is that max() is not a differentiable function so the system of equations is not one which RK would be expected to solve.  Any differential equation solver in LabVIEW or a text-based language will need to do something beyond the normal solving process to deal with the discontinuities created by max().
    If I2 is reasonably well behaved near zero, creating two sets of equations for I2 > 0 and I2 < 0 and switching based on the previous value of I2 might work.  It will be much slower because you will need to stop and start the solution process.
    The RK algorithms are documented in a number of references. It might not be too difficult to program your own with the max() function built in.
    Lynn
    You can insert images directly into your posts. Look for the tree icon in the toolbar above the message box.

Maybe you are looking for