Jump to content

Opusmodus 3.0.28945 Update


Recommended Posts

New function:


GEN-ENVELOPE-TENDENCY

This function takes a list of data and adjusts the values to fit within the specified lower and upper envelope limits. If a value is outside the given envelope, the function will adjust it to fit within the envelope and all subsequent values in the list are also adjusted by the same amount, which helps to preserve the original shape of the data.

 

Examples:

 

(setf data (gen-brownian-motion 128 :seed 43))

 

image.png

 

(setf len (length data))
(setf l-limit (envelope-samples '(0 0 1 -1 2 -1 3 -2 4 3 5 -1 6 0) len))
(setf u-limit (envelope-samples '(0 1 1 4 2 2 3 4 6 4) len))
(xy-plot (list l-limit u-limit) :join-points t)

 

image.png

 

(setf adj (gen-envelope-tendency data l-limit u-limit :seed 12))
(list-plot adj :zero-based t :point-radius 2 :join-points t)

 

 

image.png

 

With optional reflect T:

 

(setf ref (gen-envelope-tendency data l-limit u-limit :reflect t :seed 12))
(list-plot reflect :zero-based t :point-radius 2 :join-points t)

 

 

image.png

 

Happy coding,

Janusz

Link to comment
Share on other sites

  • opmo changed the title to Opusmodus 3.0.28945 Update
×
×
  • Create New...

Important Information

Terms of Use Privacy Policy