Cos function in simulink
Mostra commenti meno recenti
Is there any way I could get a cosine wave source in Simulink rather than just a sine wave?
Risposte (1)
Star Strider
il 15 Dic 2017
Modificato: Star Strider
il 15 Dic 2017
2 voti
Take the derivative of the sine?
8 Commenti
Oskar
il 19 Dic 2017
Star Strider
il 19 Dic 2017
My pleasure.
Oskar
il 19 Dic 2017
Star Strider
il 19 Dic 2017
Yes.
After you add the block, right-click on it and select Block Parameters (Cos). You can edit them in the GUI that appears.
Steven Lord
il 19 Dic 2017
Another approach is to use a Trigonometric Function block with a couple Gain blocks to operate on the signal coming from a Clock source block.
Oskar
il 19 Dic 2017
Star Strider
il 19 Dic 2017
An even easier way to do it is to select the continuous-time Sin block from Sources, then use Block Parameters (Sin) set the Amplitude, Frequency, and then set Phase to pi/2. That defines a Cosine source!
I did this, and verified it with the Scope block that it was indeed producing a cosine curve.
I have not used Simulink in a few years, and it changed in the last few releases. It took me a while to explore it.
John D'Errico
il 9 Apr 2024
Exactly. Cosine can be viewed as just a phase shifted sine.
Categorie
Scopri di più su Signal Generation in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!