TBP1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Scanned by CamScanner

Scanned by CamScanner

%
%
%
%

I first tried solving it numerically but got into difficulty and did
errors.Then refering to equation I got in solving I constructed
expressions to evaluate integrals via this code and got results
comparable to AKshay

clear;clc;close all;
% Function Time_BP

%Evaluation of ||y(t)||
funx1=@(t) (1-t/4).*(1-t/4);
funx2=@(t) (1-t/2).*(1-t/2);
funx3=@(t) (1-t/4).*(1-t/2);
test=integral(funx1,0,4);
test2=integral(funx2,0,2);
a=1;
norm_y_sq=2*a*a*integral(funx1,0,4)+2*(1-a)*(1-a)*integral(funx2,0,2)+4*a*(1-a)*int
funx1=@(t) t.*t.*(1-t/4).*(1-t/4);
funx2=@(t) t.*t.*(1-t/2).*(1-t/2);
funx3=@(t) t.*t.*(1-t/4).*(1-t/2);

%Evaluation of ||ty(t)||
norm_ty_sq=2*a*a*integral(funx1,0,4)+2*(1-a)*(1-a)*integral(funx2,0,2)+4*a*(1-a)*in
%Evaluation of ||y'(t)||
alpha1=(a/4+(1-a)/2).*(a/4+(1-a)/2);
alpha2=(a/4).*(a/4);
norm_yp_sq=4*(alpha1+alpha2);
%Evaluation of TBP
TBP=norm_ty_sq*norm_yp_sq/(norm_y_sq*norm_y_sq);
count=1;
at=[0:0.01:1];
for a=0:0.01:1
TBP(count)=Time_BP(a);
count=count+1;
end
figure,plot(at,TBP);
title('Plot of TBP vs a for Q1 Endsem');

These are TBP at a=1,0,0.5,0.25


display(Time_BP(1));
display(Time_BP(0));
display(Time_BP(0.5));
display(Time_BP(0.25));
%%Sorry for untidy presentation as Endsems are going on..:P :)

ans =
0.3000

ans =
0.3000

ans =
0.3099

ans =

0.3013

Published with MATLAB 8.0

You might also like