Helder Augusto Paraense de Oliveira Serra ECE 250 - Fundamentals of MATLAB (Wednesday) Homework Assignment 5 Problem 5.3)

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

Helder Augusto Paraense de Oliveira Serra

ECE 250 Fundamentals of MATLAB (Wednesday)


Homework Assignment 5
Problem 5.3) x = 0:0.01:3;
fx = (x+1).*(x-2).*(2.*x-0.25)-exp(x);
plot(x,fx)
figure
x = -3:0.01:6;
fx = (x+1).*(x-2).*(2.*x-0.25)-exp(x);
plot(x,fx)

Problem 5.4) fplot('(abs(cos(3*x)))^(0.5)+sin(4*x)^2', [-2 2])

Problem 5.9) fplot('(x^2-4*x-7)/(x^2-x-6)', [-6 -2])


hold on
fplot('(x^2-4*x-7)/(x^2-x-6)', [-2 3])
fplot('(x^2-4*x-7)/(x^2-x-6)', [3 6])
axis([-6 6 -20 20])
hold off

Problem 5.11) x = -pi:0.01:pi;


fx = cos(x).*sin(2.*x);
fxd = 2*cos(2.*x).*cos(x) - sin(x).*sin(2.*x);
plot(x,fx,'-b',x,fxd,'--r')
xlabel('x')
ylabel('f(x)')
legend('Function f(x)','First derivative of f(x)')

Problem 5.21) R = 80; C = 18*10^(-6); L = 260*10^(-3); vm = 10;


fd = 10:0.01:10000;
I = vm./(R^2 + ((2*pi*L.*fd - 1)./(2*pi*C.*fd)).^2).^(1/2);
semilogy(I,fd)

Problem 5.23) fplot('(12/4)*(1-exp(-4*t/1.3))', [0 0.5])


hold on
fplot('exp(-4*t/1.3)*(0/4)*(exp(0.5*4/1.3)-1)', [0.5 2])
axis([0 2 -0.25 2.5])
hold off

Problem 5.27) Io = 10^(-14); vs = 3/2.0; R = 1200; ktq = (10^3)/30.0;


vd = -1:0.001:1;
id1 = Io.*(exp(ktq.*vd) - 1);
id2 = (vs - vd)./R;
plot(vd,id1,'-b',vd,id2,'--r')

The estimated values are: voltage = 0.7459V and current = 6.284*10^(-4)A

Problem 5.33) subplot(211)


fplot('12*(120/(x+120) - (250/500) )', [0 500])
subplot(212)
fplot('12*(x/(120+x) - (250/500) )', [0 500])

You might also like