Presentation is loading. Please wait.

Presentation is loading. Please wait.

%Gauss General, Voller, jan 2012

Similar presentations


Presentation on theme: "%Gauss General, Voller, jan 2012"— Presentation transcript:

1 %Gauss General, Voller, volle001@umn.edu, jan 2012
clear all w=zeros(16,1); % column vector for storing up to 16 weights g=zeros(16,1);% gauss points tg=zeros(16,1);%transformed gauss %3-point weights w(1)=5./9; w(2)=8./9; w(3)=5./9; %3-gauss points g(1)=-sqrt(3./5); g(2)=0; g(3)=sqrt(3./5); %integral limits a=0; b=1; for jj=1:3 %transformed Gauss points tg(jj)=(a+b)./2+(b-a)/2.*g(jj); end II=0; for jj=1:3 II=II+w(jj).*exp(-(tg(jj).^2)./2); II=II*(b-a)/2 %Gauss Basic, Voller, jan 2012 clear all w1=5./9; w2=8./9; w3=5./9; g1=-sqrt(3./5); g2=0; g3=sqrt(3./5); a=0; b=1; tg1=(a+b)./2+(b-a)/2.*g1; tg2=(a+b)./2+(b-a)/2.*g2; tg3=(a+b)./2+(b-a)/2.*g3; II=0; II=II+w1.*exp(-(tg1.^2)/2); II=II+w2.*exp(-(tg2.^2)/2); II=II+w3.*exp(-(tg3.^2)/2); II=II*(b-a)/2


Download ppt "%Gauss General, Voller, jan 2012"

Similar presentations


Ads by Google