Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

a)

 

Code Block
languagenone
function result = f(x)
result = exp(-(x.^2));
end
 
% eller f = @(x) exp(-x.^2);

 

b)

...

Code Block
languagenone
x =-2:0.01:2;
plot(x,f(x))

 

c)

...

Code Block
languagenone
hold on
x = -2:0.5:2;
plot(x,f(x))

d)

Code Block
languagenone
function area = trapezoidArea(a, b, w)
area = (a+b)/2 * w;
end

e)

...