How to plot continuous on off signal using mod-command

Hi
I need to figure out how to generate a simple continuous on-off signal, by using mod-command.
Got an m-function already
function y=jj(x,a,b)
y=a+mod(x-a,b-a);
The solution must be very simple, but I can't get my head to figure it out.
The sample graf that I have is attached.
Hope you understand my dilemma.
Thanks
Tahma

2 件のコメント

Jan
Jan 2017 年 4 月 17 日
The question is not clear. You cannot "create a continuos signal". So please explain, what you want to get as output. What is x, a and b in your code?
Tero Ahmavuo
Tero Ahmavuo 2017 年 4 月 19 日
Sorry for the insufficient question.
The assignment that I have is to make a function that generates that given figure.
And the subfunction that I should use is that
Function y=jj(x,a,b)
y=a+mod(x-a,b-a);
Thats what I have at the moment.
The signal is continuous on-off and it goes on and on, bothways from the zero.
Hope you understanded my task.
Tahma

サインインしてコメントする。

回答 (0 件)

カテゴリ

質問済み:

2017 年 4 月 17 日

コメント済み:

2017 年 4 月 19 日

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by