Help me edit my matrices sizes

I am trying to find the RMSE from two sets of data, but I cant do so, because y is 20617x1 double, and y2 is 21093x1 double, can I please get some help?!
f=inline('-2/7*y^3 -2*y + 2*(2500 + 3000*cos(0.7*x))')
[x,y]=ode45(f,[0 30],26);
z=inline('-2*291*y + 2*(0 + 3000*cos(0.7*x))')
[x2,y2]=ode45(z,[0 30], 0);
xv=mean(abs((26+y2)-y));

Respuestas (1)

Jan
Jan el 12 de En. de 2014
Avoid inline and use anonymous functions instead.
If you want the output of the integrator to specific time steps, request this explicitly as described in the help text of ODE45:
[x, y] = ode45(f, linspace(0, 30, 20000), 26);
[x2, y2] = ode45(z, linspace(0, 30, 20000), 0);

1 comentario

Abdallah
Abdallah el 12 de En. de 2014
Thanks a lot. It helped me :D

La pregunta está cerrada.

Preguntada:

el 12 de En. de 2014

Cerrada:

el 20 de Ag. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by