Question: 1 X 1. Write a C program that calculates the discrete values of = f(x(t), u(t)) by using, dx dt x[n + 1] = x[n]

 1 X 1. Write a C program that calculates the discrete

1 X 1. Write a C program that calculates the discrete values of = f(x(t), u(t)) by using, dx dt x[n + 1] = x[n] + T f(x[n], u[n]) C:\UsersDU Desktop Ques1.exe t = 0.000000, v[0]=0.000000 x[0]=1.000000 t = 0.010000, [1]=0.600628 x[1]=0.996484 t = 0.020000, u[2]=0.801257 x[2]=6.992807 0.039000, [3]=6.891885 x[3]-6.989211 t = 0.048000, 0[4]=0.002513 x[4]=0.985616 = 0.050000, u[5]-0.003141 x[5]-6.982020 t = 0.868000, [6]=0.003770 x[6]=0.978424 t = 0.078000, u[7]=0.804398 x[7]=0.974828 t - 0.080000, u[8]=8.895826 x[8]=8.971233 t = 0.098000, u[9]=0.885655 x[9]=0.967637 t = 0.100000, [10]=0.806283 X[10]-6.964841 equation with To = 0.01 seconds and x[0] = 1. The function is f(x, u) = -sin (exp(-x)) + 2u and the input function is u(t) = sin(2nt/100). n = 0 starts from zero then will be maximum n = 100 which means that total period is 10 seconds (t = nts). Define arrays for t, u[n], x[n] then at the same time print on the screen

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!