photo

Elisee Yanna


Attivo dal 2017

Followers: 0   Following: 0

Messaggio

%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)}

Statistica

MATLAB Answers

1 Domanda
0 Risposte

RANK
106.575
of 300.364

REPUTAZIONE
0

CONTRIBUTI
1 Domanda
0 Risposte

ACCETTAZIONE DELLE RISPOSTE
100.0%

VOTI RICEVUTI
0

RANK
 of 20.934

REPUTAZIONE
N/A

VALUTAZIONE MEDIA
0.00

CONTRIBUTI
0 File

DOWNLOAD
0

ALL TIME DOWNLOAD
0

RANK

of 168.407

CONTRIBUTI
0 Problemi
0 Soluzioni

PUNTEGGIO
0

NUMERO DI BADGE
0

CONTRIBUTI
0 Post

CONTRIBUTI
0 Pubblico Canali

VALUTAZIONE MEDIA

CONTRIBUTI
0 Punti principali

NUMERO MEDIO DI LIKE

  • Thankful Level 1

Visualizza badge

Feeds

Visto da

Domanda


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...

quasi 8 anni fa | 1 risposta | 0

1

risposta