13243133:90053 said:HELP deadline tomorrow and i cant fix this error, hate matlab the course organiser is an asshole as well
View attachment 740624
13243158:B-Wald said:Looks like you don't have 4 arguments in the ode45 call. The left side of the equation has 4 variables, and you only have 3 on the right side.
13243223:yuck said:ive used it a bit, found it useful mostly for PID controller theory and frequency response /bode plots /root locus of higher order systems. i hate coding stuff with a passion, and although matlab code is super easy compared to most languages i still try to avoid it. that being said, i realize how valuable a resource it is and i should probably get better at using it. i torrented the full 2013 version last year so it should still be on the pirate bay.
13243442:406 said:for your output arguments, you need your time and derivative matrix x[ ].
Try [t, x] = ode45(....)
where x = [x(1) x(2) x(3) etc]... i am pretty sure this output matrix must be the same size as the time matrix.
where you take a sample every second from 0-25 seconds and calculate the derivative, it would be a matrix of 25 points.