0% found this document useful (0 votes)
19 views

Original: Cristian Alejandro Olvera Granados A00908151 David Antonio Guzmán Díaz A00908690

The document contains code to plot different functions in MATLAB. It defines three functions: 1) The original function which plots several line segments between the points (-1,0) to (2,1). 2) A function x(t-1) which shifts the original function right by 1 unit. 3) A function 3x(2-t) which stretches and shifts the original function vertically and horizontally.

Uploaded by

Cristian Olvera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views

Original: Cristian Alejandro Olvera Granados A00908151 David Antonio Guzmán Díaz A00908690

The document contains code to plot different functions in MATLAB. It defines three functions: 1) The original function which plots several line segments between the points (-1,0) to (2,1). 2) A function x(t-1) which shifts the original function right by 1 unit. 3) A function 3x(2-t) which stretches and shifts the original function vertically and horizontally.

Uploaded by

Cristian Olvera
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

Cristian Alejandro Olvera Granados

David Antonio Guzmn Daz

Original
x=[-1:.01:0]
t=-2
plot(t,x,'*b')
hold on
x=[-2:.01:-1]
t=x+1
plot(x,t,'*b')
hold on
x=[0:.01:1]
t=-1
plot(t,x,'*b')
hold on
grid on
x=[-1:.01:0]
t=1
plot(x,t,'*b')
hold on
x=[1:.01:2]
t=0
plot(t,x,'*b')
hold on
x=[0:.01:1]
t=2
plot(x,t,'*b')
hold on
x=[2:-.01:1]
t=1
plot(t,x,'*b')
hold on
x=[1:.01:2]
t=2-x
plot(x,t,'*b')
hold on
title('Original Function')

A00908151
A00908690

Cristian Alejandro Olvera Granados


David Antonio Guzmn Daz

A)
x=[-1:.01:0]
t=-1
plot(t,x,'*b')
hold on
x=[-1:.01:0]
t=x
plot(x,t,'*b')
hold on
x=[0:.01:1]
t=0
plot(t,x,'*b')
hold on
grid on
x=[0:.01:1]
t=1
plot(x,t,'*b')
hold on
x=[1:.01:2]
t=1
plot(t,x,'*b')
hold on
x=[1:.01:2]
t=2
plot(x,t,'*b')
hold on
x=[2:-.01:1]
t=2
plot(t,x,'*b')
hold on
x=[2:.01:3]
t=3-x
plot(x,t,'*b')
hold on
title('x(t-1)')

A00908151
A00908690

Cristian Alejandro Olvera Granados


David Antonio Guzmn Daz

B)
x=[-3:.01:0]
t=4
plot(t,x,'*b')
hold on
x=[0:.01:3]
t=3
plot(t,x,'*b')
hold on
x=[3:.01:6]
t=2
plot(t,x,'*b')
hold on
x=[3:.01:6]
t=1
plot(t,x,'*b')
hold on
x=[-3:.01:0]
t=3-(x/3)
plot(t,x,'*b')
hold on
x=[0:.01:3]
t=x/3
plot(t,x,'*b')
hold on
x=6
t=[1:.01:2]
plot(t,x,'*b')
hold on
x=3
t=[2:.01:3]
plot(t,x,'*b')
hold on
title('3x(2-t)')

A00908151
A00908690

Cristian Alejandro Olvera Granados


David Antonio Guzmn Daz

C)
x=[-1:.01:0]
t=-1.5
plot(t,x,'*b')
hold on
x=[-1.5:.01:-1]
t=(2*x)+2
plot(x,t,'*b')
hold on
x=[0:.01:1]
t=-1
plot(t,x,'*b')
hold on
grid on
x=[-1:.01:-.5]
t=1
plot(x,t,'*b')
hold on
x=[1:.01:2]
t=-.5
plot(t,x,'*b')
hold on
x=[-.5:.01:0]
t=2
plot(x,t,'*b')
hold on
x=[0:.01:.5]
t=1
plot(x,t,'*b')
hold on
x=[2:-.01:1]
t=0
plot(t,x,'*b')
hold on
x=[0.5:.01:1]
t=(-2*x)+2
plot(x,t,'*b')
hold on
title('x(2t+1)')

A00908151
A00908690

You might also like