Lal

20 Reputation

One Badge

9 years, 328 days

MaplePrimes Activity


These are replies submitted by Lal

@Preben Alsholm Thank you, that is awesome! I manage to make it work like I want now.

However, I still don't understand why we use the floor function? I read about ?floor and I understand what it does (it takes the nearest integer that is lower than the value) but I don't understand what is really happening in the code. I look at the code and I see that we use the function f using a value where you subtract x with the floor function of ... something... but how does this create the periodicity?

I hope you don't mind explaining. As I said, the code works like I want to know, but I would like to understand HOW it does it also.

@Preben Alsholm 

How can we write if we have a periodic function which equals one function on one interval and another function on another?

For example if we have a 2pi-periodic function for which:

f= e^x when 0 < x < pi

f=x^(-2) when pi < x < 2*pi

How can this be written in maple to be plotted periodically?

@Preben Alsholm 

Yes, you are right, it should be a 2*Pi-periodic function, I misstakenly drew a Pi-periodic one.

 

Could you please explain the code also? Why is p=b-a? And what does "(h(x-floor((x-a)/p)*p)" do? Please explain it in words so I can understand how to make it myself. Thanks!

I read that site but I don't understand it fully

Someone wrote like this:

p := plot(exp(-t), t = -1 .. 1):
with(plots): with(plottools):
display([seq(translate(p, 2*k, 0), k = -3 .. 4)], scaling = constrained);

 

Could someone explain what the part "(translate(p, 2*k, 0), k = -3 .. 4)" mean? What does p and k stand for, and what does "p, 2*k, 0" mean? Also what do the values -3..4 mean?

Page 1 of 1