Iteration code going wrong somewhere

Iteration code going wrong somewhere

Post by Gavin Cha » Wed, 15 Mar 2006 04:28:09


I need help finishing off my iteration code. I can't seem to find
where it is going wrong.

I currently have:

clear all
%define initial conditions and constants
u = 600;
m = 50;
rho = 1.207*(((1-2.333*10e-5)*y)^5);
Fg = -m*9.81;
Fa = [(-1/2*rho*0.4*0.01*abs(v))*v(1)
Fp = [(-1/2*rho*1.2*0.05*abs(v))*v(1)
p = [(u*cos(theta)*t) ((u*sin(theta)*t)+(1/2*-9.8*t^2))];
v = [((u*cos(theta)*t)+a(1)*t)

vDir = input('Enter initial angle (deg): ');

%convert theta into radians
theta = theta / 360.0 * (2.0 * pi);

for i = 1:1000
t = t+dt

if t<15
a(t) = (Fg+Fa)/m
else if t>15
a(t) =(Fg+Fa+Fp)/m

plot (v)
print theta

Thanks in advance


1. Somewhere, something went terribly wrong.

2. Somethings gone wrong somewhere captain!

Weird problem the last couple of days on our network - when everyone logs
into their pc, they effectively get a new profile. Their old profile folder
in documents and settings is there, but not shown as a profile. Going into
control panel/users and re-adding their domain account puts everything back
as it should be.
Same happened again this morning, so I checked the event log on the server.
Strangely, the 3 or 4 domain admin users we have each had an event logged
removing them from the builtin\administrators group. This was exhibitied by
the fact I could no longer log onto the server as myself, and had to use the
actual admin account. I got a "the policy of this system does not allow you
to log on interactively..." error, alhough the local policy doesn't specify
this. Adding the users back into Builtin\admins fixed this.
Next thing I noticed is I cannot get into either the Domain Security Policy
snapin, nor the Domain Controller Security Policy snapin. Both give the

"Failed to open group policy object, you may not have appropriate rights",
"An invalid dn syntax has been specified".

I assume that somewhere something has screwed up, and there is a permissions
"corruption" that is causing all these problems, but Im not really sure
where to start. There aren't any obvious looking errors on either the client
pcs' nor the servers, so Im a bit stumped!

3. Messages Going, Going, Gone somewhere

4. there is something wrong somewhere in my matlab code

5. VBA code to go to a bookmarked drop down goes to wrong drop down

6. Too few parameters error BUT only after the code has gone through MANY iterations

7. [News] When Things Go Wrong in Windows, They Go Very Wrong

8. Where have I gone wrong with this bit of code?

9. what goes wrong with this code?

10. Where does this code go wrong?

11. code gone wrong when trying to make an automated form

12. Listview API code going wrong?

13. Windows sounds playing flat - wrong sample rate somewhere?

14. This very simple C++ code has gone very wrong..

15. First bit of hacked-together code, and not sure where I've gone wrong