Re: Sine wave code

Sergei Steshenko via Help-octave <[email protected]>
Newsgroups gmane.comp.gnu.octave.general
Message-ID <[email protected]>
On 29/12/2020 11:04, Blaz wrote:
> Hello coders
>
> I have a request for some sine wave code. I need to create a modified sine
> wave where I cuttof the wave at certain value and hold this until the next
> zero crossing (Please refer to the red marked line on the picture). The sine
> wave (or some other for that matter) comes in as an input vector with 20
> samples per period (this can change though from 20 to up to 40 max, but I
> don't think this has any consequence though).
>
> This is part of a longer code, but I can not get this section done properly.
> I would appreciate any kind of ideas.
>
> Thanks.
>
> <https://octave.1599824.n4.nabble.com/file/t373917/untitled.png>
>
>
>
> --
> Sent from: https://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
>
>

Have you ever heard of 'asin', 'acos' functions ? 
https://en.wikipedia.org/wiki/Inverse_trigonometric_functions would be a 
good start.

--Sergei.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.