Friday, March 1, 2013

Simple Integral With Matlab


%simple integral for notation

f = @(x) sin(x)./x
Q = quad(f,0,pi)

%another code to define a function and plot the result
f = @(x) sin(x)./x
t=linspace(-10*pi,10*pi,1000);
plot(t,f(t));
Share:

0 comments:

Post a Comment