photo

Elisee Yanna


Aktiv seit 2017

Followers: 0   Following: 0

Nachricht

%Aufgabe5 teil a Trapezregel
function[A]=trapzregel(a,b,N)

dt=((b-a)/N )% dt=h= (b-a) ist die Trapezbreite
x=a:dt:b; % Schritte
f=@(x){10*sin(x)./x}; %gegebene Funktion
%a,b sind die Integrationsgrenzen
%plot(fx,'r')
% N ist die Zahl der Intervallen
A=0;
for(n=1:1:N)

%plot(fx,'r')

A=A+{dt/2}*{f(a)+f(a+dt)}
a=a+dt;

end

i get this failed after plotting my Code.
what is wrong in my Code? i can t fund the faillure now 2 days.I need some Help.
Thank You

Undefined operator '+' for input arguments of type 'cell'.

Error in trapzregel (line 15)
A=A+{dt/2}*{f(a)+f(a+dt)}

Statistik

MATLAB Answers

1 Frage
0 Antworten

RANG
156.658
of 300.853

REPUTATION
0

BEITRÄGE
1 Frage
0 Antworten

ANTWORTZUSTIMMUNG
100.0%

ERHALTENE STIMMEN
0

RANG
 of 21.094

REPUTATION
N/A

DURCHSCHNITTLICHE BEWERTUNG
0.00

BEITRÄGE
0 Dateien

DOWNLOADS
0

ALL TIME DOWNLOADS
0

RANG

of 171.319

BEITRÄGE
0 Probleme
0 Lösungen

PUNKTESTAND
0

ANZAHL DER ABZEICHEN
0

BEITRÄGE
0 Beiträge

BEITRÄGE
0 Öffentlich Kanäle

DURCHSCHNITTLICHE BEWERTUNG

BEITRÄGE
0 Discussions

DURCHSCHNITTLICHE ANZAHL DER LIKES

  • Thankful Level 1

Abzeichen anzeigen

Feeds

Anzeigen nach

Frage


what is wrong in my code trapezoidal rule
%Aufgabe5 teil a Trapezregel function[A]=trapzregel(a,b,N) dt=((b-a)/N )% dt=h= (b-a) ist die Trapezbreite x=a:dt:b; % Sch...

etwa 8 Jahre vor | 1 Antwort | 0

1

Antwort