# Thread: Something is wrong with my code

1. ## Something is wrong with my code

HI

I'm trying to make a graph with the following demands :

h(t)=
1 - |10*t| , |10*t| <= 1
0 , |10*t| >=1

-50 < σ< 50
-100 < ω < 100

X axe is ω
Y axe is (σ+jω)*ω
Z axe is |H(s)|
I need to make a graph of |H(s)| (the absolute value) of the Laplace transform of h(t) , but I always get the
wrong one (as showed in the attached files) . Please help me understand where is my mistake .

thanks !!!
[/B][/FONT]

2. Originally Posted by new guy
Hi guys ,

I'm trying to make a graph with the following demands :

h(t)=
1 - |10*t| , |10*t| <= 1
0 , |10*t| >=1

-50 < σ< 50
-100 < ω < 100

X axe is ω
Y axe is (σ+jω)*ω
Z axe is |H(s)|
I need to make a graph of |H(s)| (the absolute value) of the Laplace transform of h(t) , but I always get the
wrong one (as showed in the attached files) . Please help me understand where is my mistake .

thanks !!!
[/b][/font]
Hi.

But there is one little thing I don't understand.

The code says:

h(t):= A(10*t)

So your function h(t) is equal to

h(t)=
1 - |10*t| , |10*t| <= 1
0 , |10*t| >=1
But you integrate h(t*10) - you use the function
h(t) = 1-|10*10*t|, iff |10*10*t| <= 1 and
h(t) = 0, iff |10*10*t| >=1.

Is this really the function you want to work with? I guess that is not h(t) from the quote above.

Anyway I'm not sure what I'm talking about.

Kind regards
Rapha