use matlab to represent equations
Ältere Kommentare anzeigen
i am now trying to use use matlab to represent equations

come up with:
t1=0;
t2=0;
for n=1:N-2
r1=(1/(N-1))*x(n)*x(n+1);
r2=(1/(N-2))*x(n)*x(n+2);
t1=t1+r2+((r2)^2+8*(r1)^2)^(1/2);
end
for n=1:N-1
r1=(1/(N-1))*x(n)*x(n+1);
t2=t2+4*r1;
end
r = t1/t2;
if (r>1)
r=1;
end
if (r<-1)
r=-1;
end
w=acos(r);
it does not seem to work, could anyone help to correct? thank you!
2 Kommentare
modified covariance
am 23 Okt. 2012
Jan
am 23 Okt. 2012
"It does not seem to work" is not a helpful description of the occurring problems. Please be so kind and explain the difference between the results and your expectations.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Systems of Nonlinear Equations finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!