Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
???
  • Loading branch information
nin13001 committed Dec 6, 2017
1 parent 7afbe35 commit c89e9c2
Showing 1 changed file with 1 addition and 30 deletions.
31 changes: 1 addition & 30 deletions README.md
Expand Up @@ -139,33 +139,4 @@ end
![](assets/README-ac6c7a25.png)

# Problem 5
```
set(0, 'defaultAxesFontSize', 16)
set(0,'defaultTextFontSize',14)
set(0,'defaultLineLineWidth',1)
dt=0.1;
x=[0:dt:20]';
y_n=zeros(length(x),4);
y_n(1,:)=[10 0 0 2];
for i=2:length(x)
dy=phugoid_ode(x(i-1),y_n(i-1,:));
y_n(i,:)=y_n(i-1,:)+dt*dy;
end
dt=0.01;
x=[0:dt:20]';
y_n2=zeros(length(x),4);
y_n2(1,:)=[10 0 0 2];
for i=2:length(x)
dy=phugoid_ode(x(i-1),y_n2(i-1,:));
y_n2(i,:)=y_n2(i-1,:)+dt*dy;
end
[t23,y23]=ode23(@(t,y) phugoid_ode(t,y),[0 20],[10 0 0 2]);
d = figure(4);
plot(y_n(:,3),y_n(:,4),y_n2(:,3),y_n2(:,4),y23(:,3),y23(:,4))
legend('Euler .1','Euler .01','ode23','Location','Northeast')
xlabel('Distance')
ylabel('Height')
```
![](assets/README-f6577255.png)
![](assets/README-f6577255.png)

0 comments on commit c89e9c2

Please sign in to comment.