05-31-2016 11:08 AM
I'm using ode_rk45 in mathscript and I'm using global variables in my differential equations.
In Labview Simulation the keyword "global" is working fine but in MyRio its generating an error.
This is the function I'm using ode_rk45 to solve it :
function dzAdt = lorenzT(t, y) global A; global B; dzAdt=zeros(3,1); dzAdt(1)= A*cos(y(3)) ; dzAdt(2)= B*sin (y(3)) ; dzAdt(3)=A;
And this is my main program code :
global A;
global B;
A = 5;
B = 6;
[t,y] = ode_rk45('LorenzT',[1 ;3],[0.1 ; 0.2 ; 0.5])
Is there any way to use my A and B values in the differential equations ?
06-01-2016 01:56 PM
Hi youssef007
Could you be more specific with the error you are seeing with the myRIO.
06-03-2016 05:20 PM
Hi Rairiki, here is the error :
Error in function global at line 1: This function is not supported on the current hardware target.
this error is pointed on the line 1 on :
global A;