I'm writing a program that can solve the equation of motion for an inverted pendulum. However, on the line "F=int ... ", I get an error saying "unbalanced or unexpected parenthesis or bracket". However, I checked it many times and it seems that the bracket/parenthesis are balanced. I'm guessing the error is coming from the part "s,tn-(n/2),tn+(n/2)", but I'm not sure why
function [ theta ] = Untitled( theta_o,omega_o )
nt=5001; %since (50-0)/.01 = 5000
dt = .01; % =H
H=.01;
theta_n = ones(nt,1);
theta_n(1)=0; %theta_o
omega_n = ones(1,nt);
omega_n(1)=-0.4; %omega_o
epsilon=10^(-6);
eta = epsilon*10;
t_o=0;
for n=1:4999
tn=t_o+n*dt;
F=int((422.11/eta)*exp[[5*(4*((eta*t-s-tn)^2)/eta^2)-1]^(-1)]*omega, s,tn-(n/2),tn+(n/2))
theta_n(n+1) = theta_n(n) + h*F;
end
end
EDIT: I converted the [] into (), and now the error "Undefined function or variable 't'."