System of differential equations to solve a model of BZ reaction
Hello
I wrote this little code to visualize the oscillation of the BZ reaction. I expect to see the oscillation as in page 3 and 7 of the link below
http://home2.fvcc.edu/~dhicketh/DiffEqns/spring2014projects/SilasSchwarz/final/final/bzreaction.PDF
This work is done in Matlab, and I want to reproduce in Labview with the same settings. But so far I could not see the oscillation.
Could someone body spot what is wrong with this code?
See you soon,.
Zied
I have noticed that but not had time yesterday to examine it. I've implemented their matlab scripts and it turns out that the constants they give; e, e' and q are in fact 10 ^-n, and not 10 ^ n. A typo in a student newspaper, how rare once I changed that I had the correct plot as shown here:
Attached to the VI. It runs much more slowly than in Matlab, so be warned.
Tags: NI Software
Similar Questions
-
FIRST HP: Solving a system of linear equations with a parameter
Hello
I know how to solve a system of linear equations by using a setting by hand but I don't know how to set up in the calculator.
Can someone please help me solve the system of linear equations below with a 'p' on the first HP Calculator next parameter?
2 x + 8z = 26
4 x-4y-14z = - 38
8 x - 4y + 2z = 14
The answer to the above equations is:
x = 13 - 4, =(45-15p)/2, z = p y p
Thank you
Arthur
Hello
What you're trying to solve is not really a system of equation with a parameter, but you try to solve a set of 2 equations with 2 variables (x and y).
The case solve command can do for you.
According to the CASE, type:
Solve ([(2*x+8*z) = 26,(4*x-4*y-14*z) = - 38,(8*x-4*y+2*z) = 14], [x, y])
Come in
and the calculator will return
{[-4 * z + 13, 15/2 * z + 45/2]}
which is what you want.
Cyrille
-
First HP: differential equation solver...
Hi all
I would like to know how to use HP first to solve the differential equation
I tried to read the user manual, but with no luck.Tim
Hi!, @Theplum:
Welcome to Forum!
If you learn properly the use of desolve, you see, better explained in the AUR HP50G, of...
[PDF] HP 50 g / 49 g + / 48gII graphing calculator
h10032.www1.HP.com › manual GTC -
Just me, or is the 50g low in solving differential equations?
Hi all
I used Ti-89 s widely in the past, as well as the Ti-NSpire CX CASE and now the 50 g for about 1.5 years. I love some aspects of the 50g (sensation of keys, ease of unit, RPN conversion), but I can't help but notice some areas where it reallllly hangs out of the competition.
It is an example that I really noticed recently in solving differential equations. So far, several examples I've tried (all immediately resolved by my Ti - 89 and Nspire CX CASE), the 50g smothered on each.
A very simple example: solve y "= - 9.8, with boundary conditions y (0) = 2.9 and y'(0) = 3.8. This can be solved by hand in about one minute, but the 50g can't do. If I input ['d1d1Y (X) =-9.8' ' Y (0) = 2.9 ' ' d1Y (0) = 3.8 '] in level 2 on the stack, then 'Y' on a level and then run desolve, it returns "Error: Undefined result.
I missing something here, or is - this really unable to resolve such a differential equation based? I thought that advanced and 'better' mathematical capacity HP CASE was meant to be one of the reasons why it takes precedence over offers from Ti, but I must say, so far I do not see that.
Josh
Hello!
Try with the exact numbers:
["d1d1Y (X) =-49/5 ' ' Y (0) = 29/10 ' ' d1Y (0) = 19/5 '"]
« Y »
DESOLVE
(after SIMPLIFICATION) You'll get years:
{Y (X) =-(49*X^2-38*X-29)/10}
-
Dear Sir
I am a beginner in labview and I would like to solve two differential equations and field them over time:
DX1/dt = (G - K * x 1 (t)) /V (t)
dV (t) /dt = (1/((1-(((G-x1*(K-U))/(G-x0*(K-U)))^((U/(K-U)))-1))*U
G = 7.8
U = 0,166
x 0 = 132
VO = 432
K = 2.02
Could someone please help me and send the block diagram for these two equations.
The graphs of these two variables have to be reduced over time. The graph of X 1 is of exponential decay.
Hello Ahmad,
I made a simple example and put it on our community page. This example uses our ODE solver vis LabVIEW comes with 8 built in ODE solvers. These are all linear system solvers. It seems that your equations are not linear. I suggest using the LaPlace transforms to solve equations.
-
The first (emulator) HP: HP Premium differential equations
Hello
I'm looking a calculator with AC for my electrical engineering studies and just tested
the first emulator to get a first impresseion.
But while testing its features, I got some results of unexpectet on differential equations,
that I would be confirmed on a calculator of real world.A simple as equation y' = x
CODE: desolve (diff (y) = x, x, y)
wait-> x ^ 2/2 + C
First HP-> 1/2 * (x ^ 2 + 2 * C).The result is correct, but nobody would write it down in this way, nor would one solve it how works the first.
A little more difficult equation could not be resolved by the premium: 2 x ^ 3 * (1 + y ^ 2) = y'
CODE: desolve (2 * x ^ 3 *(1+y^2) = diff (y), x, y)
wait-> y = tan (1/2 * x ^ 4 + C).
First HP-> could not resolve the implicit equationIt is not an implicit equation, the two WolframAlpha (iOS) and CASES of TI (iOS) could also resolve this one)
And last but not least: y' * sin (x) = y * ln
CODE: desolve (diff (y) * sin (x) = y * ln (y), x, y)
wait-> y = e ^ (C * tan (x/2))
First HP-> y = e ^ (sqrt (cos (x) ^ 2-1) / (C * cos (x) + C))I don't know what made the CASE here, but there is no reason to use the Pythagorean trigonometric identity.
Would be nice if someone with a premium could conifrm/refute these results or tell me what I've done
evil.Hello
The latest version of premium can solve your 2nd test case (desolve ((2 * x ^ 3 *(1+y^2)) = (y'), x, y))
However, the results for 1 and 3 test cases are the same that you tested.
I will pass the info to the person who develops the CASE and if all goes well he will be able to improve it.
Cyrille
-
Hello
Does anyone know if there is such AS classes or functions to solve systems of linear equations? On the form A * x = c. A is a square matrix, x is a vector of unknown, and c are constants.
In other words, a system of equations with a number of well-known (1-5) and an equal number of equations.
Here is an implementation of the elimination, Gaussian, that you can use. There is no error checking included:
package com.kglad {}
public class Gaussian_Elimination {}
public void solveF(a:Array):Array {}
for (var pivotCol:int = 0; pivotCol<>
a = pivotF(a,pivotCol);
var factor: number;
for (var row: int = pivotCol + 1; row)<>
factor = a [row] [pivotCol];
for (var _col:int = pivotCol; _col)<>
a = [line] [_col] has [pivotCol] [_col] * factor;
}
}
}
Return echelonF (a);
}
private void pivotF(a:Array,pivotCol:int):Array {}
var maxAbs:Number = 0;
var maxRow:int;
for (var row: int = 0; line)<>
{if (Math.ABS (a [Row] [pivotCol]) > maxAbs)}
maxRow = row.
maxAbs = Math.abs (a [row] [pivotCol])
}
}
pivotCol line swap with maxRow
var tempA:Array = a [pivotCol];
normalize the maxRow
var number: max = a [maxRow] [pivotCol];
for (var i: int = 0; i<>
a [maxRow] [i] / = max;
}
[pivotCol] = a [maxRow];
a [maxRow] = tempA;
return a;
}
private void echelonF(a:Array):Array {}
var years: Array = [];
var last: int = a [0] .length-1;
for (var row: int = 0; line)<>
var term: Number = 0;
for (var num:int = 0; num<>
duration = [line] [last-num-1] * and [num];
}
end += [line] [last];
ans.push(Term/a[Row][Last-Row-1]);
}
Return ans.reverse ();
}
}
}
-
Algebraic manipulations of solutions to differential equations
Hi, guys
I found the general solution of the differential equation y "-3 t = 1 using the command DESOLVE. I did it manually first and the answer I got was: 1/2 t ^ 3 + 1/2 t ^ 2 + C1t + C2; However, when I do with the calculator that I get is: (2cC0 + t * cC1 2 + t ^ 3 + t ^ 2) / 2. I tried everything in the ALG menu to get rid of the 2 in the denominator. Nothing has worked. I'm in Exact, symbolic mode. Am I missing something?
Thank you very much!
Hi!, jc_cfa:
If you have RPN MODE...
Configure the FLAGS ...
Function 03-> symb
Approx. 105 mode on
Calculator modes
Number format... STD
-
solve the differential equation
Hello
I m trying to solve a simple equation using euler vi. But I have not yet. the equation is:
(T) DH / DT = 1/A *(F-h/R). I m not understand what I need to plug on euler vi. I´v already took a look at the example of ode euler, but I continuously difficult. Please help me. Thank you.
I guess that your real goal is to learn to use Euler's method as it is a fairly easy to solve analytically ODE. Here's a quick example.
-
HP 40GS systems of linear equation with parameters
Hello
I'm in the learning curve of the HP 40GS - a very interesting tool.
Is it possible to solve systems of equations with parameters, for example:
A * X + Y = 2 * 12
5 * X - 3 * A * Y = 5
HP 50 g, this isn't a big deal, but with HP 40GS I don't have an idea so far.
If this is not possible, it will be possible if I have a third equation (so 3 equations in 3 unknowns)?
Thank you very much in advance,
Joachim
P.S.: So far, I feel very comfortable with the HP 40GS and menus!
----------------------------------------
I am not a member of the HP Calculator development team - unfortunately!Hello
now, I found a way to calculate the systems of equations with symbolic coefficients:
See the document: http://www.hp.com/ctg/Manual/c00829737.pdf to page 346ff
With the command 'linsolve', it is possible to calculate with more unknown than equations.
I hope this helps anyone with the same or close problem.
Have fun with your calculators and do not hesitate to write other ways of calculations.
Greetings,
Joachim
-
Resolution of a system of nonlinear equations
Hey guys,.
Currently, I am trying to solve a set of nonlinear equations in LabView with the help of MathScript and MATLAB code. I am trying to create a code of work for hours, but I have not yet reached this goal.System of equations:
x ^ 2 + y ^ 2 + z ^ 2 - R1 ^ 2 == 0
x ^ 2 + (y - Y0) ^ 2 + z ^ 2 - R2 ^ 2 == 0
(x X_0) ^ 2 + y ^ 2 + z ^ 2 - R3 ^ 2 == 0R1, R2, R3, X 0, Y0 are known.
A possible solution in MATLAB (assuming that X 0 = Y0 = 100, R1 ^ 2 = R3 ^ 2 = 11000, R2 ^ 2 = 9000):
Create myfun.m with the contents:
function F = myfun (x);
F = [x (1) ^ 2 + (2) x ^ 2 + x (3) ^ 2-11000;]
x (1) ^ 2 + (x 2-100) ^ 2 + (3) x ^ 2-9000;
(x 1-100) ^ 2 + x (2) ^ 2 + (3) x ^ 2-11000];
endThe initial value for iteration:
x 0 = [50 50 50]FIX:
fsolve (@myfun, x 0)=> Works great!
Now, I tried all these stuff plug a MathScript node:
function F = myfun (x);
F = [x (1) ^ 2 + (2) x ^ 2 + x (3) ^ 2-11000;]
x (1) ^ 2 + (x 2-100) ^ 2 + (3) x ^ 2-9000;
(x 1-100) ^ 2 + x (2) ^ 2 + (3) x ^ 2-11000];x 0 = [50 50 50];
Ground = fsolve (@myfun, x 0);
This is where the problem begins.
When I try to run the program, I get the following error message:
A function is defined in the present text. You must save and call
function with input values appropriate to run the function.I can't really understand, what I did wrong and I would be very grateful if someone could help me.
Kind regards
fuchristHello
MathScript does not support inline function defined by the user (UDF). What you need to do is
- Define the UDF in a ".m" file. Give this file the same name as your UDF ".m".
- Save the file ".m" MathScript search path. By default, the search path is the LabVIEW data folder.
- Pass the name of the file ".m" as the first string input to the fsolve function in the MathScript node.
I enclose my .m file and snapshot of the MathScript node. The result I got is [50, 60, 70] which must be correct.
-
System crash while playing the Sims 3 'Model HP H8 - 1250a'
Original title: have a model HP H8 - 1250 A and it just crashed all playing the Sims 3. It's only a week, if that.
Have a HP H8 - 1250a model and it just crashed all playing the Sims 3, is only a week old so that... What can I do to prevent it happening again?
Hello
1. are you able to start the computer in normal mode?
2. What is the exact error message or error code?
3. is that the question is limited to this game?Try the next method and check if it helps.
Method 1:
Game hangs or quits unexpectedly: http://support.microsoft.com/kb/303032
Method 2:If you are not able to connect to the system, I suggest you follow the below mentioned steps.
Step 1:
Try to start in safe modeHow to start in safe mode in Windows 7: http://windows.microsoft.com/en-US/windows7/Start-your-computer-in-safe-mode
If you are able to connect in safe mode, and then perform step 2 and check if that helps.
Step 2:
Try a clean boot to safe mode and restart the computer in normal mode.
How to solve problems using the clean boot in Windows 7: http://support.microsoft.com/kb/929135
Note: Once the diagnosis has been made, make sure that you try to step 7 of the article to reset the computer as usual.
-
I really need HELP! I received the nugel.exe virus on my laptop. I have Windows XP and I was reading how to remove it. They told me to go to click on the Start button in it, then click on run. type msconfig and on the Startup tab, uncheck everything that ends with TSSD. Well, none of which ended in TSSD was there, so I was told everything that had an UNKNOWN manufacturer in buttons SERVICES and STARTUP uncheck. I restarted my computer and the NELSON was always there. Then suddenly my computer shut down on its own and restarted with a screen that says now "Windows didn't start because the following file is missing or corrupt: \system32\hal.dll
.» Please reinstall a copy of the above file. "Does anyone know how to do this? I feel that I've dealt with the virus stupid for days and I'm going crazy! Can someone please help me solve what I did wrong? PLEASE, I BEG YOU! Hi ehaze64,
Looks like you have made incorrect changes in system configuration utility.
See the Microsoft articles below to solve the problem by installing the recovery console and use the Bootcfg.exe tool to rebuild the Boot.ini file.
How to install and use the Recovery Console in Windows XP
http://support.Microsoft.com/kb/307654
Error message: "Windows did not start because of a configuration of the disk of the computer problem.
http://support.Microsoft.com/kb/314477
"Invalid Boot.ini" or "Windows did not start" error messages when you start your computer
http://support.Microsoft.com/kb/330184
I hope this helps!
Halima S - Microsoft technical support.
Visit our Microsoft answers feedback Forum and let us know what you think.
-
We know what the lights blue and orange system on an average of HP desktop model e9237c?
My model HP e9237c system has two flashing lights at the top. One is orange and the other is blue. Can someone for
of course, what the lights mean. I have a lot of different (maybe answers), but know seems to know. Blue is for a lot of time with orange sometimes. Thank you
I answered this on your other thread.
Kind regards
ERICO -
Variables in the function MathScript ode solver
Hello
I'm using LabView for awhile and I started using the text tools more. To solve a system of differential equations, there is this very elegant tool to do this in a MathScript node with the ode solve algorithms (for example, "ode_adams"). As the LabView help said, I've defined a function and registered as a ".m" file. I loaded this function in mathscript and solve differential equations.
Both and so good, but my problem is that I can not all variables in the function. I can only put numbers in the function but not variables. Unfortunately I need to define the variables outside the function in the MathScript node.
Does anyone have an idea how to manage the variables in this case?
I have attatched a picture of the function and test VI (LV2014).
Greetings
Global variables to solve this problem:
Solution:
Greetings
Maybe you are looking for
-
Problems with Mail 9.3?
Mail will not open on my MBP with El Capitan. Something changed when the Application was amended on 12 April 2016?
-
How do I check that my computer is connected
Hello I would like to know if it is possible (in TestStand) to verify that the remote computer is already connected before starting the steps more on it? In fact, I would like to send a request to the IP address of the remote computer to see if it is
-
Simple Handler.vi error ignores the error code?
I'm trying to understand the behavior of Simple Error Handler.vi, and it confuses me because it seems not be properly error code I give. According to the documentation, if I have an error code, then: If error in indicates an error, the VI ignores the
-
What is the resolution for USB-6210 for positive ranges of entry?
Hello I use USB-6210 to sample different types of sensors and each has its own range of values. I have two questions: (a) what are the fixed beaches of USB-6210 where most suitable is chosen automatically depending on the settings of user intput scop
-
LAN is not recognizing my Ethernet cable
Hey everyone, I have problems with my Local network setting on my computer recognizing that there is an ethernet cable connected. I run a Toshiba Satellite A210 with Windows Vista and a D-Link Wireless G router. The router is not the issue, because