% plotting results plot(xex,yex,'k','LineWidth',2);
title('Euler-Cauchy') xlabel('x');
ylabel('y(x)') grid on, hold on
plot(X,Y,'or','LineWidth',1.6)% red circles plot(X,Y,'b','LineWidth',1.6) legend('Exact solution','Euler-Cauchy',4);
text(10,2,sprintf('%s%.2f\n','Step size =',H));
% plotting results plot(xex,yex,'k','LineWidth',2);
title('Euler-Cauchy') xlabel('x');
ylabel('y(x)') grid on, hold on
plot(X,Y,'or','LineWidth',1.6)% red circles plot(X,Y,'b','LineWidth',1.6) legend('Exact solution','Euler-Cauchy',4);
text(10,2,sprintf('%s%.2f\n','Step size =',H));
Ich weiss die Implementierung ist falsch, wie muss es denn richtig sein???
TH
Gast
Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
Verfasst am: 03.01.2011, 15:54
Titel:
Ich dachte ich nehm einfach den alten Wert und gut is... ne is falsch.
Zitat aus Wiki:
The backward Euler method is an implicit method, meaning that we have to solve an equation to find yn+1
Kann mir bitte jemand sagen wie es richtig implementiert ist?
TH
Gast
Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
Verfasst am: 03.01.2011, 19:55
Titel:
Hi,
ich würde mich wirklich freuen, wenn mir jemand sagen könnte, ob das richtig implementiert ist:
Ne du, so klar war mir das nicht,
die Ergebnisse sahen "zunächst" gut aus. Waren aber nicht bei allen Werten gut. Jetzt gehts!!! DANKE
Einstellungen und Berechtigungen
Du kannst Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.